-
Notifications
You must be signed in to change notification settings - Fork 22
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
OLS-342, OLS-347: creation and deletion of console plugin #30
OLS-342, OLS-347: creation and deletion of console plugin #30
Conversation
@raptorsun: This pull request references OLS-347 which is a valid jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
@raptorsun: This pull request references OLS-347 which is a valid jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
if err != nil { | ||
return fmt.Errorf("failed to create Console UI configmap: %w", err) | ||
} | ||
r.logger.Info("Console configmap created", "configmap", cm.Name) |
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.
I think we need to be consistent in logging.
In other resources we don't log resource creation, only the error during creation.
} | ||
|
||
if deploymentSpecEqual(&foundDeployment.Spec, &deployment.Spec) { | ||
r.logger.Info("Console UI deployment unchanged", "deployment", deployment.Name) |
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.
Same here
Throughout the code we use ".... reconciliation skipped"
return nil | ||
} | ||
|
||
plugin.SetResourceVersion(foundPlugin.GetResourceVersion()) |
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.
Why are we doing this?
Do we want to indicate that the resource has changed?
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.
the k8s client refuse to update the resource in absence of resrouce version.
we can also just replace the spec of foundPlugin with generated one and use the foundPlugin to update the resource.
Name: ConsoleCRName, | ||
}, | ||
Spec: openshiftv1.ConsoleSpec{ | ||
Plugins: []string{"monitoring-plugin"}, |
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.
must be lightspeed-console-plugin
for the entire PR
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.
This minics the Console resource in the openshift cluster, it has "monitoring-plugin" activated by default.
At the end of this test case, we check this list contains "lightspeed-console-plugin" (at line 88)
82a5094
to
e6ac23c
Compare
Thank you for the review @vbelouso :) |
e6ac23c
to
ddb6633
Compare
@raptorsun: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
I'm OK with that, but perhaps in the future we will need to explore additional options for comparing objects more natively. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vbelouso 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 |
Description
This PR contain the creation and deletion of the console plugin.
Type of change
Related Tickets & Documents
Checklist before requesting a review
Testing