Skip to content

Commit

Permalink
Format issues fixed
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Vargas <[email protected]>
  • Loading branch information
rubenvp8510 committed Apr 29, 2020
1 parent e040a52 commit 862f9f7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions pkg/upgrade/v1_18_0.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
)

func upgrade1_18_0(ctx context.Context, client client.Client, jaeger v1.Jaeger) (v1.Jaeger, error) {

// Transform collector flags
jaeger.Spec.Collector.Options = migrateCollectorOptions(&jaeger)
// Remove agent flags
Expand Down Expand Up @@ -47,11 +46,9 @@ func migrateCollectorOptions(jaeger *v1.Jaeger) v1.Options {
}
opts := migrateDeprecatedOptions(jaeger, jaeger.Spec.Collector.Options, collectorDeprecatedFlags)
return transformCollectorPorts(jaeger.Logger(), opts, collectorDeprecatedFlags)

}

func migrateAgentOptions(jaeger *v1.Jaeger) v1.Options {

deleteAgentFlags := []deprecationFlagMap{
{from: "collector.host-port"},
{from: "reporter.tchannel.discovery.conn-check-timeout"},
Expand All @@ -68,9 +65,7 @@ func migrateAgentOptions(jaeger *v1.Jaeger) v1.Options {
opsMap["reporter.grpc.host-port"] = fmt.Sprintf("dns:///%s.%s:14250",
service.GetNameForHeadlessCollectorService(jaeger), jaeger.Namespace)
}

return v1.NewOptions(opsMap)

}

func transformCollectorPorts(logger *log.Entry, opts v1.Options, collectorNewFlagsMap []deprecationFlagMap) v1.Options {
Expand All @@ -85,6 +80,5 @@ func transformCollectorPorts(logger *log.Entry, opts v1.Options, collectorNewFla
in[d.to] = fmt.Sprintf(":%s", val)
}
}

return v1.NewOptions(in)
}
1 change: 0 additions & 1 deletion pkg/upgrade/v1_18_0_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,4 @@ func TestUpgradeAgentWithTChannelEnablev1_18_0_(t *testing.T) {
collectorOpts := persisted.Spec.Agent.Options.Map()

assert.Contains(t, collectorOpts, "reporter.grpc.host-port")

}

0 comments on commit 862f9f7

Please sign in to comment.