-
Notifications
You must be signed in to change notification settings - Fork 518
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
Add pod update checking to WaitForControlledPodsRunning #1035
Conversation
@mborsz: GitHub didn't allow me to assign the following users: wojtekt-t. Note that only kubernetes members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/hold |
/assign @wojtek-t |
@@ -108,6 +110,12 @@ func (w *waitForControlledPodsRunningMeasurement) Execute(config *measurement.Me | |||
if err != nil { | |||
return nil, err | |||
} | |||
// default value is set to true to let presubmit validate this change. | |||
// TODO(mborsz): Change default to false before submitting. |
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.
Note to myself - ensure it's removed before lgtm-ing.
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.
We should also add a TODO to make the default true eventually.
Maybe we shouldn't do that on Friday, but once we get enough confidence we should enabled it by default as it's the right way to do.
@@ -108,6 +110,12 @@ func (w *waitForControlledPodsRunningMeasurement) Execute(config *measurement.Me | |||
if err != nil { | |||
return nil, err | |||
} | |||
// default value is set to true to let presubmit validate this change. | |||
// TODO(mborsz): Change default to false before submitting. |
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.
We should also add a TODO to make the default true eventually.
Maybe we shouldn't do that on Friday, but once we get enough confidence we should enabled it by default as it's the right way to do.
clusterloader2/pkg/measurement/util/runtimeobjects/runtimeobjects.go
Outdated
Show resolved
Hide resolved
I finished manual tests of this. It seems to work. FTR yamls I used to test this: # config.yaml
name test:
automanagedNamespaces: 1
tuningSets:
- name: 100qps
GlobalQPSLoad:
qps: 100
burst: 10
- name: RandomizedUpdateTimeLimited
RandomizedTimeLimitedLoad:
timeLimit: 2h
steps:
- name: Starting measurement for waiting for pods
measurements:
- Identifier: WaitForRunningMicroservices
Method: WaitForControlledPodsRunning
Params:
action: start
apiVersion: apps/v1
kind: Deployment
labelSelector: l1 = v1
operationTimeout: 1h
- name: Create Foos
phases:
- namespaceRange:
min: 1
max: 1
replicasPerNamespace: 1
tuningSet: 100qps
objectBundle:
- basename: foo
objectTemplatePath: foo.yaml
templateFillMap:
env: old
- name: Waiting for objects become updated
measurements:
- Identifier: WaitForRunningMicroservices
Method: WaitForControlledPodsRunning
Params:
action: gather
- name: Update Foos
phases:
- namespaceRange:
min: 1
max: 1
replicasPerNamespace: 1
tuningSet: 100qps
objectBundle:
- basename: foo
objectTemplatePath: foo.yaml
templateFillMap:
env: new
- name: Waiting for objects become updated
measurements:
- Identifier: WaitForRunningMicroservices
Method: WaitForControlledPodsRunning
Params:
action: gather
# foo.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-foo
labels:
l1: v1
spec:
selector:
matchLabels:
l1: v1
replicas: 3
template:
metadata:
labels:
l1: v1
spec:
containers:
- image: k8s.gcr.io/pause:3.1
name: test
env:
- name: XX
value: {{.env}}
resources:
limits:
cpu: 10m The most interesting log entries:
|
This is unnecessary (daemoset controller adds this toleration anyway) and breaks kubernetes#1035
This is unnecessary (daemoset controller adds this toleration anyway) and breaks kubernetes#1035
/hold cancel I tested this, changed default back to false. |
/lgtm |
/hold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mborsz, 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 |
/hold cancel |
/retest |
This implements an experimental support for waiting for pod updates in WaitForControlledPodsRunning.
The new logic is enabled by setting
checkIfPodsAreUpdated: true
flag (name TBD).At this point, nothing special happens.
Let's trigger some update:
The
gather
call will block here untilreplicas
pods exist in given deployment that match deployment's spec.template.spec.Without this change, we would wait only for any
replicas
pod exist in given deployment (regardless if they are updated or not) which is not correct./assign @wojtekt-t
/assign @mm4tt