Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ func (r *Reconciler) fillInClusterStatus(mc *clusterv1beta1.MemberCluster, cp *c
} else {
// throw an alert
_ = controller.NewUnexpectedBehaviorError(fmt.Errorf("cluster certificate authority data not found in member cluster %s status", mc.Name))
cp.Status.AccessProviders[0].Cluster.InsecureSkipTLSVerify = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we want to remove this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, actually there was a comment from @michaelawyu on the previous PR. It's better to play safe and not assume that we should use insecure mode since this is unexpected.

}
}

Expand Down
6 changes: 5 additions & 1 deletion pkg/propertyprovider/azure/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,13 @@ func (p *PropertyProvider) Start(ctx context.Context, config *rest.Config) error
}
p.clusterCertificateAuthority = cadata
p.clusterCertificateAuthorityObservedTime = time.Now()
klog.V(2).Info("Cached cluster certificate authority data from file")
} else if len(config.CAData) > 0 {
p.clusterCertificateAuthority = config.CAData
p.clusterCertificateAuthorityObservedTime = time.Now()
klog.V(2).Info("Cached cluster certificate authority data")
} else {
err := fmt.Errorf("rest.Config CAFile empty: %s", config.CAFile)
err := fmt.Errorf("rest.Config has empty CAFile and CAData")
klog.ErrorS(err, "No certificate authority data available in rest.Config")
}

Expand Down
Loading