Skip to content

Commit

Permalink
updated jaeger spec strategy to use constant instead of string
Browse files Browse the repository at this point in the history
Signed-off-by: Shubhanshu Surana <[email protected]>

Signed-off-by: Shubhanshu Surana <[email protected]>
  • Loading branch information
Shubhanshu Surana committed Nov 4, 2019
1 parent 1ac060d commit 2785eef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/config/sampling/sampling.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func CheckForSamplingConfigFile(jaeger *v1.Jaeger) bool {
options := v1.Options{}

// check for deployment strategy
if jaeger.Spec.Strategy == "allInOne" {
if jaeger.Spec.Strategy == v1.DeploymentStrategyAllInOne {
options = jaeger.Spec.AllInOne.Options
} else {
options = jaeger.Spec.Collector.Options
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/sampling/sampling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestUpdateWithSamplingConfig(t *testing.T) {

func TestUpdateWithSamplingConfigFileOption(t *testing.T) {
jaeger := v1.NewJaeger(types.NamespacedName{Name: "TestUpdateWithSamplingConfigFileOption"})
jaeger.Spec.Strategy = "allInOne"
jaeger.Spec.Strategy = v1.DeploymentStrategyAllInOne
jaeger.Spec.AllInOne.Options = v1.NewOptions(map[string]interface{}{
"sampling.strategies-file": "/etc/jaeger/sampling.json",
})
Expand Down

0 comments on commit 2785eef

Please sign in to comment.