Skip to content
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

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

mm4tt
Copy link
Contributor

@mm4tt mm4tt commented Jul 29, 2019

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 29, 2019
@mm4tt mm4tt changed the title Load secrets configmaps Create configmaps and secrets in extended load test Jul 29, 2019
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 29, 2019
@@ -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
Copy link
Member

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.

Copy link
Contributor Author

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:

  1. a pod with just secret
  2. a pod with just configmap
  3. 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.

Copy link
Member

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?

Copy link
Contributor Author

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.

@mm4tt mm4tt force-pushed the load_secrets_configmaps branch from a79307f to 0850adb Compare July 29, 2019 16:51
@@ -187,6 +188,15 @@ func isEven(number interface{}) bool {
return int(toFloat64(number))%2 == 0
}

func isModIn(a interface{}, mod interface{}, acceptedValues ...interface{}) bool {
Copy link
Member

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 ?

Copy link
Contributor Author

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.

@mm4tt mm4tt force-pushed the load_secrets_configmaps branch from 0850adb to 2e9e9f8 Compare July 30, 2019 09:16
@mm4tt mm4tt closed this Jul 30, 2019
@mm4tt mm4tt reopened this Jul 30, 2019
@mm4tt mm4tt force-pushed the load_secrets_configmaps branch from 2e9e9f8 to 5f49d14 Compare July 30, 2019 11:49
@mm4tt
Copy link
Contributor Author

mm4tt commented Jul 30, 2019

@wojtek-t, PTAL

@mm4tt mm4tt force-pushed the load_secrets_configmaps branch from 5f49d14 to 73f7c79 Compare July 30, 2019 13:17
@wojtek-t
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 30, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 8041318 into kubernetes:master Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants