File tree 3 files changed +26
-19
lines changed
3 files changed +26
-19
lines changed Original file line number Diff line number Diff line change @@ -1706,16 +1706,17 @@ func (c *Cluster) GetCurrentProcess() Process {
1706
1706
// GetStatus provides status of the cluster
1707
1707
func (c * Cluster ) GetStatus () * ClusterStatus {
1708
1708
status := & ClusterStatus {
1709
- Cluster : c .Name ,
1710
- Namespace : c .Namespace ,
1711
- Team : c .Spec .TeamID ,
1712
- Status : c .Status ,
1713
- Spec : c .Spec ,
1714
- MasterService : c .GetServiceMaster (),
1715
- ReplicaService : c .GetServiceReplica (),
1716
- StatefulSet : c .GetStatefulSet (),
1717
- GeneralPodDisruptionBudget : c .GetGeneralPodDisruptionBudget (),
1718
- CurrentProcess : c .GetCurrentProcess (),
1709
+ Cluster : c .Name ,
1710
+ Namespace : c .Namespace ,
1711
+ Team : c .Spec .TeamID ,
1712
+ Status : c .Status ,
1713
+ Spec : c .Spec ,
1714
+ MasterService : c .GetServiceMaster (),
1715
+ ReplicaService : c .GetServiceReplica (),
1716
+ StatefulSet : c .GetStatefulSet (),
1717
+ GeneralPodDisruptionBudget : c .GetGeneralPodDisruptionBudget (),
1718
+ CriticalOpPodDisruptionBudget : c .GetCriticalOpPodDisruptionBudget (),
1719
+ CurrentProcess : c .GetCurrentProcess (),
1719
1720
1720
1721
Error : fmt .Errorf ("error: %s" , c .Error ),
1721
1722
}
Original file line number Diff line number Diff line change @@ -831,3 +831,8 @@ func (c *Cluster) GetStatefulSet() *appsv1.StatefulSet {
831
831
func (c * Cluster ) GetGeneralPodDisruptionBudget () * policyv1.PodDisruptionBudget {
832
832
return c .GeneralPodDisruptionBudget
833
833
}
834
+
835
+ // GetPodDisruptionBudget returns cluster's kubernetes PodDisruptionBudget for critical operations
836
+ func (c * Cluster ) GetCriticalOpPodDisruptionBudget () * policyv1.PodDisruptionBudget {
837
+ return c .CriticalOpPodDisruptionBudget
838
+ }
Original file line number Diff line number Diff line change @@ -58,15 +58,16 @@ type WorkerStatus struct {
58
58
59
59
// ClusterStatus describes status of the cluster
60
60
type ClusterStatus struct {
61
- Team string
62
- Cluster string
63
- Namespace string
64
- MasterService * v1.Service
65
- ReplicaService * v1.Service
66
- MasterEndpoint * v1.Endpoints
67
- ReplicaEndpoint * v1.Endpoints
68
- StatefulSet * appsv1.StatefulSet
69
- GeneralPodDisruptionBudget * policyv1.PodDisruptionBudget
61
+ Team string
62
+ Cluster string
63
+ Namespace string
64
+ MasterService * v1.Service
65
+ ReplicaService * v1.Service
66
+ MasterEndpoint * v1.Endpoints
67
+ ReplicaEndpoint * v1.Endpoints
68
+ StatefulSet * appsv1.StatefulSet
69
+ GeneralPodDisruptionBudget * policyv1.PodDisruptionBudget
70
+ CriticalOpPodDisruptionBudget * policyv1.PodDisruptionBudget
70
71
71
72
CurrentProcess Process
72
73
Worker uint32
You can’t perform that action at this time.
0 commit comments