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

Tolerations & Resources Override using .Subscription.Config #1334

Merged

Conversation

umangachapagain
Copy link
Contributor

@umangachapagain umangachapagain commented Feb 28, 2020

Description of the change:
(feat) inject 'Tolerations' & 'Resources' from config

Updated deployment initializer function to inject tolerations
and resources specified in pod configuration of subscription
into deployment object.

  • Toleration will be appended if it does not exist
  • Resources will be overwritten

(test) update e2e test

Motivation for the change:
#1298

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci-robot
Copy link
Collaborator

Hi @umangachapagain. Thanks for your PR.

I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-ci-robot openshift-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 28, 2020
@umangachapagain umangachapagain changed the title Tolerations & Resources Override using .Subscription.Config [WIP] Tolerations & Resources Override using .Subscription.Config Feb 28, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 28, 2020
@ecordell
Copy link
Member

ecordell commented Mar 2, 2020

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 2, 2020
@umangachapagain umangachapagain changed the title [WIP] Tolerations & Resources Override using .Subscription.Config Tolerations & Resources Override using .Subscription.Config Mar 3, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 3, 2020
@umangachapagain
Copy link
Contributor Author

/retest

2 similar comments
@benluddy
Copy link
Contributor

benluddy commented Mar 4, 2020

/retest

@umangachapagain
Copy link
Contributor Author

/retest

Updated deployment initializer function to inject tolerations
and resources specified in pod configuration of subscription
into deployment object.

- Toleration will be appended if it does not exist
- Resources will be overwritten

Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
includes tests for tolerations and resources override

Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
@umangachapagain
Copy link
Contributor Author

/retest

added examples for Tolerations and Resources spec in
Subscription config.

Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
@umangachapagain
Copy link
Contributor Author

/retest

Copy link
Member

@ecordell ecordell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

This looks great, thank you for including clear docs and tests.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 13, 2020
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ecordell, umangachapagain

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 13, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

18 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@awgreene
Copy link
Member

awgreene commented Aug 6, 2020

/cherry-pick release-4.4

@openshift-cherrypick-robot

@awgreene: #1334 failed to apply on top of branch "release-4.4":

In response to this:

/cherry-pick release-4.4

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.

@umangachapagain umangachapagain deleted the subs_config branch December 10, 2020 06:26
@hochdorf
Copy link

@umangachapagain was this feature intentionally planned to delete the resources section from the operator deployment even though the related config section is not defined in the subscription?

Based on the code changes and based on my tests if the resources config is not defined in the subscription but it was given in the CSV for the operator then it will be removed from the deployment during installation.

We define the resource needs of an operator on the CSV level because in this way you can define it differently for the separate versions.
After this feature, it's not possible.

Is this behaviour conceptual? Or just a bug?

@umangachapagain
Copy link
Contributor Author

@umangachapagain was this feature intentionally planned to delete the resources section from the operator deployment even though the related config section is not defined in the subscription?

Based on the code changes and based on my tests if the resources config is not defined in the subscription but it was given in the CSV for the operator then it will be removed from the deployment during installation.

We define the resource needs of an operator on the CSV level because in this way you can define it differently for the separate versions.
After this feature, it's not possible.

Is this behaviour conceptual? Or just a bug?

It's a bug. The intention was to override resources spec, but not blindly.

Please report a bug with your findings.

@hochdorf
Copy link

hochdorf commented Dec 17, 2020

@umangachapagain was this feature intentionally planned to delete the resources section from the operator deployment even though the related config section is not defined in the subscription?
Based on the code changes and based on my tests if the resources config is not defined in the subscription but it was given in the CSV for the operator then it will be removed from the deployment during installation.
We define the resource needs of an operator on the CSV level because in this way you can define it differently for the separate versions.
After this feature, it's not possible.
Is this behaviour conceptual? Or just a bug?

It's a bug. The intention was to override resources spec, but not blindly.

Please report a bug with your findings.

Thanks!
#1912

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. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

None yet

9 participants