未验证 提交 79e35971 编写于 作者: Z zryfish 提交者: GitHub

fix cluster status (#2192)

上级 d4b7d88b
...@@ -205,6 +205,9 @@ func (v *ApplicationController) syncApplication(key string) error { ...@@ -205,6 +205,9 @@ func (v *ApplicationController) syncApplication(key string) error {
} }
annotations := application.GetAnnotations() annotations := application.GetAnnotations()
if annotations == nil {
annotations = make(map[string]string)
}
annotations["kubesphere.io/last-updated"] = time.Now().String() annotations["kubesphere.io/last-updated"] = time.Now().String()
application.SetAnnotations(annotations) application.SetAnnotations(annotations)
......
...@@ -518,7 +518,8 @@ func (c *clusterController) syncCluster(key string) error { ...@@ -518,7 +518,8 @@ func (c *clusterController) syncCluster(key string) error {
c.updateClusterCondition(cluster, clusterReadyCondition) c.updateClusterCondition(cluster, clusterReadyCondition)
} }
if !isConditionTrue(cluster, clusterv1alpha1.ClusterAgentAvailable) { if cluster.Spec.Connection.Type == clusterv1alpha1.ConnectionTypeProxy &&
!isConditionTrue(cluster, clusterv1alpha1.ClusterAgentAvailable) {
clusterNotReadyCondition := clusterv1alpha1.ClusterCondition{ clusterNotReadyCondition := clusterv1alpha1.ClusterCondition{
Type: clusterv1alpha1.ClusterReady, Type: clusterv1alpha1.ClusterReady,
Status: v1.ConditionFalse, Status: v1.ConditionFalse,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册