1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 23:16:22 +00:00

Handle upgrade from metrics server 0.2.x to 0.3.x

This commit is contained in:
moelsayed
2018-10-04 23:42:01 +02:00
committed by Alena Prokharchyk
parent 496d1a46a5
commit 22dc19205f
2 changed files with 11 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ type MetricsServerOptions struct {
RBACConfig string
Options map[string]string
MetricsServerImage string
Version string
}
type addonError struct {
@@ -204,10 +205,14 @@ func (c *Cluster) deployKubeDNS(ctx context.Context) error {
func (c *Cluster) deployMetricServer(ctx context.Context) error {
log.Infof(ctx, "[addons] Setting up Metrics Server")
s := strings.Split(c.SystemImages.MetricsServer, ":")
versionTag := s[len(s)-1]
MetricsServerConfig := MetricsServerOptions{
MetricsServerImage: c.SystemImages.MetricsServer,
RBACConfig: c.Authorization.Mode,
Options: c.Monitoring.Options,
Version: getTagMajorVersion(versionTag),
}
metricsYaml, err := addons.GetMetricsServerManifest(MetricsServerConfig)
if err != nil {