mirror of
https://github.com/rancher/rke.git
synced 2025-09-16 06:59:25 +00:00
add comments and other minor improvements
This commit is contained in:
@@ -412,15 +412,15 @@ func parseEventRateLimit(clusterFile string, rkeConfig *v3.RancherKubernetesEngi
|
||||
return nil
|
||||
}
|
||||
logrus.Debugf("event rate limit is found in cluster.yml")
|
||||
var r map[string]interface{}
|
||||
err := ghodssyaml.Unmarshal([]byte(clusterFile), &r)
|
||||
var parsedClusterFile map[string]interface{}
|
||||
err := ghodssyaml.Unmarshal([]byte(clusterFile), &parsedClusterFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error unmarshalling: %v", err)
|
||||
}
|
||||
if r["services"] == nil {
|
||||
if parsedClusterFile["services"] == nil {
|
||||
return nil
|
||||
}
|
||||
cfg, found, err := unstructured.NestedMap(r, "services", "kube-api", "event_rate_limit", "configuration")
|
||||
cfg, found, err := unstructured.NestedMap(parsedClusterFile, "services", "kube-api", "event_rate_limit", "configuration")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user