[release-4.8] Bug 2089971: lib/resourcemerge: handle container env var deletions#3161
Conversation
The logic in the resourcemerge functions only iterate through required variables, meaning any removed variable is not handled. As a fix to bug 1981549, this adds removal check for env vars, which ensures that e.g. a removed proxy will correctly propagate to the daemonset definition, which needs the proxy injected as an environment variable to allow MCD to pull os image updates. This of course is also a problem for everything else being synced via these lib functions, but for now I only added the fix to EnvVar for proxy, as it is the most likely issue for users to hit. If we want to fix all other variables, we should probably also consider reworking the resource* libraries in general, since they are outdated and error prone. To test, you can pause the pool, add a cluster proxy and then remove it, checking the MCD daemonset after both steps to see the proxy being added/removed. Interestingly, the adding of the proxy is almost instant, whereas the removal can take up to 10 minutes due to the MCO seemingly not resyncing (no action from proxy informer?). I am investigating that separately. Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
This aims to add some initial tests for EnvVar handling specifically, to make sure we don't regress proxy. Other unit tests should be added as we clean up the code. Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
|
@openshift-cherrypick-robot: Bugzilla bug 2071689 has been cloned as Bugzilla bug 2089971. Retitling PR to link against new bug. DetailsIn 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. |
|
@openshift-cherrypick-robot: This pull request references Bugzilla bug 2089971, which is invalid:
Comment DetailsIn 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. |
sinnykumari
left a comment
There was a problem hiding this comment.
/lgtm
/bugzilla refresh
|
@sinnykumari: This pull request references Bugzilla bug 2089971, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 6 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: openshift-cherrypick-robot, sinnykumari The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/label backport-risk-assessed |
|
/retest |
|
/label backport-risk-assessed Shouldn't be risky |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
/label cherry-pick-approved |
|
@openshift-cherrypick-robot: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/retest |
|
@openshift-cherrypick-robot: All pull requests linked via external trackers have merged: Bugzilla bug 2089971 has been moved to the MODIFIED state. DetailsIn 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. |
This is an automated cherry-pick of #3057
/assign yuqi-zhang