Skip to content

Commit

Permalink
two more app event types (#216)
Browse files Browse the repository at this point in the history
* adds MaxResourceLimitExceedec and JobTimeOut app event types

* adds MaxResourceLimitExceedec and JobTimeOut app event types

---------

Co-authored-by: [email protected] <[email protected]>
  • Loading branch information
yosefmih and [email protected] authored Mar 25, 2024
1 parent 9601ccd commit 21b1d4a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 13 deletions.
39 changes: 26 additions & 13 deletions generated/go/porter/v1/agent_app_event_types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions generated/js/src/porter/v1/agent_app_event_types_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ export declare enum AppEventType {
*/
INSUFFICIENT_RESOURCES = 1,

/**
* APP_EVENT_TYPE_MAX_RESOURCE_LIMIT_EXCEEDED is generated when pods can't be scheduled because the node group has reached maximum capacity
*
* @generated from enum value: APP_EVENT_TYPE_MAX_RESOURCE_LIMIT_EXCEEDED = 3;
*/
MAX_RESOURCE_LIMIT_EXCEEDED = 3,

/**
* APP_EVENT_TYPE_INSUFFICIENT_CPU is generated when pods can't be scheduled because there is insufficient CPU
*
Expand Down Expand Up @@ -77,5 +84,12 @@ export declare enum AppEventType {
* @generated from enum value: APP_EVENT_TYPE_FAILING_HEALTH_CHECK = 40;
*/
FAILING_HEALTH_CHECK = 40,

/**
* APP_EVENT_TYPE_JOB_TIMEOUT is generated when a job container runs for more than the timeout period set for it
*
* @generated from enum value: APP_EVENT_TYPE_JOB_TIMEOUT = 45;
*/
JOB_TIMEOUT = 45,
}

2 changes: 2 additions & 0 deletions generated/js/src/porter/v1/agent_app_event_types_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const AppEventType = /*@__PURE__*/ proto3.makeEnum(
[
{no: 0, name: "APP_EVENT_TYPE_UNSPECIFIED", localName: "UNSPECIFIED"},
{no: 1, name: "APP_EVENT_TYPE_INSUFFICIENT_RESOURCES", localName: "INSUFFICIENT_RESOURCES"},
{no: 3, name: "APP_EVENT_TYPE_MAX_RESOURCE_LIMIT_EXCEEDED", localName: "MAX_RESOURCE_LIMIT_EXCEEDED"},
{no: 5, name: "APP_EVENT_TYPE_INSUFFICIENT_CPU", localName: "INSUFFICIENT_CPU"},
{no: 10, name: "APP_EVENT_TYPE_INSUFFICIENT_MEMORY", localName: "INSUFFICIENT_MEMORY"},
{no: 15, name: "APP_EVENT_TYPE_STUCK_PENDING", localName: "STUCK_PENDING"},
Expand All @@ -21,6 +22,7 @@ export const AppEventType = /*@__PURE__*/ proto3.makeEnum(
{no: 30, name: "APP_EVENT_TYPE_OUT_OF_MEMORY", localName: "OUT_OF_MEMORY"},
{no: 35, name: "APP_EVENT_TYPE_NON_ZERO_EXIT_CODE", localName: "NON_ZERO_EXIT_CODE"},
{no: 40, name: "APP_EVENT_TYPE_FAILING_HEALTH_CHECK", localName: "FAILING_HEALTH_CHECK"},
{no: 45, name: "APP_EVENT_TYPE_JOB_TIMEOUT", localName: "JOB_TIMEOUT"},
],
);

6 changes: 6 additions & 0 deletions porter/v1/agent_app_event_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ enum AppEventType {
// This is either CPU or Memory, but agent cannot resolve
APP_EVENT_TYPE_INSUFFICIENT_RESOURCES = 1;

// APP_EVENT_TYPE_MAX_RESOURCE_LIMIT_EXCEEDED is generated when pods can't be scheduled because the node group has reached maximum capacity
APP_EVENT_TYPE_MAX_RESOURCE_LIMIT_EXCEEDED = 3;

// APP_EVENT_TYPE_INSUFFICIENT_CPU is generated when pods can't be scheduled because there is insufficient CPU
APP_EVENT_TYPE_INSUFFICIENT_CPU = 5;

Expand All @@ -33,4 +36,7 @@ enum AppEventType {

// APP_EVENT_TYPE_FAILING_HEALTH_CHECK is generated when a container is restarted due to a failing health check
APP_EVENT_TYPE_FAILING_HEALTH_CHECK = 40;

// APP_EVENT_TYPE_JOB_TIMEOUT is generated when a job container runs for more than the timeout period set for it
APP_EVENT_TYPE_JOB_TIMEOUT = 45;
}

0 comments on commit 21b1d4a

Please sign in to comment.