File tree Expand file tree Collapse file tree 3 files changed +26
-19
lines changed Expand file tree Collapse file tree 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 {
17061706// GetStatus provides status of the cluster
17071707func (c * Cluster ) GetStatus () * ClusterStatus {
17081708 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 (),
17191720
17201721 Error : fmt .Errorf ("error: %s" , c .Error ),
17211722 }
Original file line number Diff line number Diff line change @@ -831,3 +831,8 @@ func (c *Cluster) GetStatefulSet() *appsv1.StatefulSet {
831831func (c * Cluster ) GetGeneralPodDisruptionBudget () * policyv1.PodDisruptionBudget {
832832 return c .GeneralPodDisruptionBudget
833833}
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 {
5858
5959// ClusterStatus describes status of the cluster
6060type 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
7071
7172 CurrentProcess Process
7273 Worker uint32
You can’t perform that action at this time.
0 commit comments