-
Notifications
You must be signed in to change notification settings - Fork 546
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
Create configmaps and secrets in extended load test #703
Conversation
@@ -24,6 +27,15 @@ spec: | |||
requests: | |||
cpu: 10m | |||
memory: "10M" | |||
volumeMounts: | |||
{{if and $EnableConfigMaps (IsModIn .Index 20 8 19) }} # .Index % 20 in {8,19} - 10% deployments will have ConfigMap |
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.
Given that we're randomly distributing instances (indexes) over time, I think "IsDivisible" would actually be enough and easier to follow.
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.
My intention was to have 10% of pods with secrets, 10% of pods with configmaps and to exercise all combinations, i.e. to have:
- a pod with just secret
- a pod with just configmap
- a pod with both
While I agree that it may be hard to parse at the first glance, it allows to easily express arbitrary configurations.
Let's discuss this tomorrow in person.
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.
OK - I see your point.
Then my question is why do we need "InSet"? Why "IsModEqual" not enough?
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.
Realized that built-in eq supports multiple values. In that cases implementing just Mod is enough, which I did.
a79307f
to
0850adb
Compare
@@ -187,6 +188,15 @@ func isEven(number interface{}) bool { | |||
return int(toFloat64(number))%2 == 0 | |||
} | |||
|
|||
func isModIn(a interface{}, mod interface{}, acceptedValues ...interface{}) bool { |
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.
Since you introduce it, can you also remove IsEven and IsOdd ?
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.
Will do that in a follow up PR, I have some other things to change as well.
0850adb
to
2e9e9f8
Compare
2e9e9f8
to
5f49d14
Compare
@wojtek-t, PTAL |
5f49d14
to
73f7c79
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mm4tt, wojtek-t The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
#704