Skip to content
Next Next commit
pod completion status-1
Signed-off-by: asm582 <asm582@nyu.edu>
  • Loading branch information
asm582 committed Jul 4, 2022
commit 216a7c20ef20080a74af7f1d9974727d1253357e
15 changes: 10 additions & 5 deletions pkg/apis/controller/v1beta1/appwrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ limitations under the License.
package v1beta1

import (
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
Expand Down Expand Up @@ -209,6 +209,9 @@ type AppWrapperStatus struct {
// +optional
Running int32 `json:"running,omitempty" protobuf:"bytes,1,opt,name=running"`

//The total number of running pods which is used to determine Completed status of AW
MaxRunning int32 `json:"runcount,omitempty" protobuf:"bytes,1,opt,name=runcount"`

// The number of resources which reached phase Succeeded.
// +optional
Succeeded int32 `json:"Succeeded,omitempty" protobuf:"bytes,2,opt,name=succeeded"`
Expand Down Expand Up @@ -260,10 +263,11 @@ type AppWrapperState string

//enqueued, active, deleting, succeeded, failed
const (
AppWrapperStateEnqueued AppWrapperState = "Pending"
AppWrapperStateActive AppWrapperState = "Running"
AppWrapperStateDeleted AppWrapperState = "Deleted"
AppWrapperStateFailed AppWrapperState = "Failed"
AppWrapperStateEnqueued AppWrapperState = "Pending"
AppWrapperStateActive AppWrapperState = "Running"
AppWrapperStateDeleted AppWrapperState = "Deleted"
AppWrapperStateFailed AppWrapperState = "Failed"
AppWrapperStateCompleted AppWrapperState = "Completed"
)

type AppWrapperConditionType string
Expand All @@ -279,6 +283,7 @@ const (
AppWrapperCondPreempted AppWrapperConditionType = "Preempted"
AppWrapperCondDeleted AppWrapperConditionType = "Deleted"
AppWrapperCondFailed AppWrapperConditionType = "Failed"
AppWrapperCondCompleted AppWrapperConditionType = "Completed"
)

// DeploymentCondition describes the state of a deployment at a certain point.
Expand Down
Loading