Commit b1896822 authored by loganhz's avatar loganhz Committed by Alena Prokharchyk
Browse files

Sorting etcd tls config before setup the config

Problem:

Monitoring get redeployed due to etcd params updated. However, it is not expected as the etcd address doesn't change at all.

Solution:

Sort it before assign.

Issue:

https://github.com/rancher/rancher/issues/19945
parent a7b55aac
v2.1.0 release/v2.2.2-patch Tags unavailable
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
......@@ -347,6 +347,9 @@ func (ch *clusterHandler) deployApp(appName, appTargetNamespace string, appProje
}
if etcdTLSConfig != nil {
sort.Slice(etcdTLSConfig, func(i, j int) bool {
return etcdTLSConfig[i].internalAddress < etcdTLSConfig[j].internalAddress
})
appAnswers["exporter-kube-etcd.certFile"] = etcdTLSConfig[0].certPath
appAnswers["exporter-kube-etcd.keyFile"] = etcdTLSConfig[0].keyPath
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment