fix cluster status (#2192)
This commit is contained in:
@@ -205,6 +205,9 @@ func (v *ApplicationController) syncApplication(key string) error {
|
||||
}
|
||||
|
||||
annotations := application.GetAnnotations()
|
||||
if annotations == nil {
|
||||
annotations = make(map[string]string)
|
||||
}
|
||||
annotations["kubesphere.io/last-updated"] = time.Now().String()
|
||||
application.SetAnnotations(annotations)
|
||||
|
||||
|
||||
@@ -518,7 +518,8 @@ func (c *clusterController) syncCluster(key string) error {
|
||||
c.updateClusterCondition(cluster, clusterReadyCondition)
|
||||
}
|
||||
|
||||
if !isConditionTrue(cluster, clusterv1alpha1.ClusterAgentAvailable) {
|
||||
if cluster.Spec.Connection.Type == clusterv1alpha1.ConnectionTypeProxy &&
|
||||
!isConditionTrue(cluster, clusterv1alpha1.ClusterAgentAvailable) {
|
||||
clusterNotReadyCondition := clusterv1alpha1.ClusterCondition{
|
||||
Type: clusterv1alpha1.ClusterReady,
|
||||
Status: v1.ConditionFalse,
|
||||
|
||||
Reference in New Issue
Block a user