-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set default redundancy policy to zero #501
Conversation
Signed-off-by: Gary Brown <[email protected]>
…count Signed-off-by: Gary Brown <[email protected]>
@jpkrohling Decided to make it the default regardless of node count - makes it simpler. @jkandasa Could you test the PR please to make sure fixes the issue. |
It would probably be wise to create a ticket to come up with smarter defaults based on the number of nodes, but for now, LGTM. |
@objectiser can you provide operator image with this PR? |
@jkandasa Will do |
Codecov Report
@@ Coverage Diff @@
## master #501 +/- ##
==========================================
+ Coverage 91.94% 91.95% +<.01%
==========================================
Files 65 65
Lines 3290 3292 +2
==========================================
+ Hits 3025 3027 +2
Misses 185 185
Partials 80 80
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #501 +/- ##
==========================================
+ Coverage 91.94% 91.95% +<.01%
==========================================
Files 65 65
Lines 3290 3292 +2
==========================================
+ Hits 3025 3027 +2
Misses 185 185
Partials 80 80
Continue to review full report at Codecov.
|
@objectiser I tested this fix, works as expected, But I see jaeger services are not coming up, maybe another issue?
|
@@ -143,6 +144,9 @@ func normalizeElasticsearch(spec *v1.ElasticsearchSpec) { | |||
if spec.NodeCount == 0 { | |||
spec.NodeCount = 1 | |||
} | |||
if spec.RedundancyPolicy == "" { | |||
spec.RedundancyPolicy = esv1.ZeroRedundancy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This string option is used to specify replica shards. Instead of exposing an integer ECL decided to expose a human readable string. The number of nodes is taken into the account when calculating the replica shards.
jaeger-operator/pkg/storage/elasticsearch.go
Lines 200 to 212 in 0d6bd5f
func calculateReplicaShards(policyType esv1.RedundancyPolicyType, dataNodes int) int { | |
switch policyType { | |
case esv1.FullRedundancy: | |
return dataNodes - 1 | |
case esv1.MultipleRedundancy: | |
return (dataNodes - 1) / 2 | |
case esv1.SingleRedundancy: | |
return 1 | |
case esv1.ZeroRedundancy: | |
return 0 | |
default: | |
return 1 | |
} |
This should be defaulting to SingleRedundancy
to keep backwards compatibility.
Fixes #497
Signed-off-by: Gary Brown [email protected]