mlycore commented on issue #166:
URL: 
https://github.com/apache/shardingsphere-on-cloud/issues/166#issuecomment-1381466681

   ComputeNodeStatus
   ```golang
   // ComputeNodeStatus defines the observed state of ShardingSphere Proxy
   type ComputeNodeStatus struct {
        // The generation observed by the deployment controller.
        // +optional
        ObservedGeneration int64 `json:"observedGeneration,omitempty"`
   
        // ShardingSphere-Proxy phase are a brief summary of the 
ShardingSphere-Proxy life cycle
        // There are two possible phase values:
        // Ready: ShardingSphere-Proxy can already provide external services
        // NotReady: ShardingSphere-Proxy cannot provide external services
        // +optional
        Phase ComputeNodePhaseStatus `json:"phase"`
   
        // Conditions The conditions array, the reason and message fields
        // +optional
        Conditions ComputeNodeConditions `json:"conditions"`
        // ReadyInstances shows the number of replicas that 
ShardingSphere-Proxy is running normally
        // +optional
        ReadyInstances int32 `json:"readyInstances"`
   
        // LoadBalancer contains the current status of the load-balancer,
        // if one is present.
        // +optional
        LoadBalancer LoadBalancerStatus `json:"loadBalancer,omitempty"`
   }
   
   type LoadBalancerStatus struct {
        // +optional
        ClusterIP string `json:"clusterIP,omitempty"`
   
        // Ingress is a list containing ingress points for the load-balancer.
        // Traffic intended for the service should be sent to these ingress 
points.
        // +optional
        Ingress []corev1.LoadBalancerIngress `json:"ingress,omitempty"`
   }
   
   type ComputeNodePhaseStatus string
   
   const (
        ComputeNodeStatusReady    ComputeNodePhaseStatus = "Ready"
        ComputeNodeStatusNotReady ComputeNodePhaseStatus = "NotReady"
   )
   
   type ComputeNodeConditionType string
   
   // ComputeNodeConditionType shows some states during the startup process of 
ShardingSphere-Proxy
   const (
        ComputeNodeConditionInitialized ComputeNodeConditionType = "Initialized"
        ComputeNodeConditionStarted     ComputeNodeConditionType = "Started"
        ComputeNodeConditionReady       ComputeNodeConditionType = "Ready"
        ComputeNodeConditionUnknown     ComputeNodeConditionType = "Unknown"
        ComputeNodeConditionDeployed    ComputeNodeConditionType = "Deployed"
        ComputeNodeConditionFailed      ComputeNodeConditionType = "Failed"
   )
   
   type ComputeNodeConditions []ComputeNodeCondition
   
   type ConditionStatus string
   
   const (
        ConditionStatusTrue    = "True"
        ConditionStatusFalse   = "False"
        ConditionStatusUnknown = "Unknown"
   )
   
   // ComputeNodeCondition
   // | **phase** | **condition**  | **descriptions**|
   // | ------------- | ---------- | 
---------------------------------------------------- |
   // | NotReady      | Deployed   | pods are deployed but are not created or 
currently pending|
   // | NotReady      | Started    | pods are started but not satisfy ready 
requirements|
   // | Ready         | Ready      | minimum pods satisfy ready requirements|
   // | NotReady      | Unknown    | can not locate the status of pods |
   // | NotReady      | Failed     | ShardingSphere-Proxy failed to start 
correctly due to some problems|
   type ComputeNodeCondition struct {
        Type           ComputeNodeConditionType `json:"type"`
        Status         ConditionStatus          `json:"status"`
        LastUpdateTime metav1.Time              
`json:"lastUpdateTime,omitempty"`
        Reason         string                   `json:"reason"`
        Message        string                   `json:"message"`
   }
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to