gitops-2415 added reconcile plugin condition#398
Conversation
f33d49d to
31dd4ea
Compare
|
Hi @ciiay @keithchong |
Hi Jaideep, thanks for the review. Yes, going forward we will only reconcile dynamic plugin resources when OCP is 4.15 or higher version. On OCP 4.14 or lower, user will still be able to use static plugin. Please refer to the GITOPS-2415 and Keith's comment in GITOPS-2369 |
|
/test v4.10-e2e |
@ciiay according to that comment we will disable it by default, but users should have the option to enable it - and we should document that enabling the dynamic plugin means there will be 2 environment tabs rendered in the console This will require changes in the CRD to add a new field to enable/disable teh dynamic plugin, and the operator would need to be able to reconcile the plugin based on that setting in the CR |
For now the SDK is not supporting to set Console Plugin default to Enable, so we have to only reconcile it once the static plugin gets removed on OCP 4.15. Where else to document the 2 environment buttons rendered in the console besides GITOPS-2369 and GITOPS-2415? |
I'm not talking about enabling by default...I'm saying last I knew we were going to keep it disabled by default for < 4.15 but were still going to support enabling the dynamic plugin via the CR on OCP < 4.15 if the user explicitly wished to do so |
There are two definition of Enable.
We want to keep only one “Environments” button, so to avoid two buttons showing up, we only create dynamic plugins when static plugin is no longer there |
| addKnownTypesToScheme(s) | ||
|
|
||
| fakeClient := fake.NewFakeClient(newGitopsService()) | ||
| fakeClient := fake.NewFakeClient(util.NewClusterVersion("4.15.1"), newGitopsService()) |
There was a problem hiding this comment.
@jaideepr97 Yes, it's needed, because I’m checking the OCP version in Reconcile function, if I don’t set it in the unit tests, it will through error and unit tests will fail. Or is there a better way to solve the problem?
There was a problem hiding this comment.
| }, | ||
| } | ||
| fakeClient := fake.NewFakeClient(gitopsService) | ||
| fakeClient := fake.NewFakeClient(util.NewClusterVersion("4.12.1"), gitopsService) |
There was a problem hiding this comment.
Same as the previous one, if I don't set it here the unit test fails.
There was a problem hiding this comment.
|
@ciiay @jaideepr97 @keithchong The below logic added in the PR seems to ignore the creation of |
@iam-veeramalla that is what i have asked above, it seems the decision is to only allow creation of dynamic plugin resources starting 4.15 (not even provide the option to enable it by the user) so im actually not sure how anyone would be able to test this until we have a 4.15 cluster |
| } | ||
| v2, err := version.NewVersion("4.15.0") | ||
| if v1.LessThan(v2) { | ||
| return reconcile.Result{}, err |
There was a problem hiding this comment.
@ciiay I don't think we need to return an error here, we can just have
if !v1.LessThan(v2) {
r.reconcilePlugin(instnace, request)
}
6f9831a to
9b0388e
Compare
05d42b8 to
f3a7d47
Compare
|
@ciiay Please add sign-offs to all commits so the DCO check passes |
84f58b9 to
4e42591
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
84f58b9 to
d1aee7d
Compare
e4de905 to
90efe71
Compare
2dd8a23 to
aa55d06
Compare
|
@ciiay: 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. |
…perator into gitops-2415-add-reconcile-plugin-condition Signed-off-by: Yi Cai <yicai@redhat.com>
1076342 to
cd79612
Compare
|
New PR created #402. Closing this PR due to rebase and sign off issue. |
What type of PR is this?
/kind enhancement
What does this PR do / why we need it:
To avoid multiple "Environments" button showing up in left menu on Developer tab in DevConsole.
Have you updated the necessary documentation?
Which issue(s) this PR fixes:
Fixes GITOPS-2415
Test acceptance criteria:
How to test changes / Special notes to the reviewer: