fix cluster status (#2192)

This commit is contained in:
zryfish
2020-06-11 16:10:19 +08:00
committed by GitHub
parent d4b7d88b4b
commit 79e3597173
2 changed files with 5 additions and 1 deletions

View File

@@ -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)

View File

@@ -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,