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

OCPBUGS-18354: owns watches config updates #405

Conversation

jakobmoellerdev
Copy link
Contributor

This updates all cluster-scoped subresources to have 6 new labels useful for filtering and assignments (in place of the usual ownerreference) - csidriver, volumesnapshotclass,scc,storageclass will now receive these labels. These labels are also used to filter the watch to stop watching for unnecessary objects in the cluster.

On top of this, now LVMVolumeGroupNodeStatus receives OwnerReferences from LVMVolumeGroup. We can later decide to upgrade them to blockOwnerDeletion as well, but currently its a normal OwnerReference (no controller reference to avoid conflicts between multiple volume groups on one NodeStatus). If the volumegroup disappears from the node, so does the owner reference.

Snapshotting was moved to a similar check as SecurityContextConstraints to also allow a watch on the correct snapshot class. Sideeffect: if LVMS is installed after snapshot apis, a manual restart is necessary. For all openshift distros and people aware of this, this shouldnt be an issue since the APIs are usually installed before extension operators.

Also adds an Owns configuration to the LVMCluster for the deployment controller of topo lvm in addition to the already watched daemon set.

Now all resources except for the initially created CSIDriver are watched and reacted to on status.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 4, 2023
@openshift-ci-robot
Copy link

@jakobmoellerdev: This pull request references Jira Issue OCPBUGS-18354, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This updates all cluster-scoped subresources to have 6 new labels useful for filtering and assignments (in place of the usual ownerreference) - csidriver, volumesnapshotclass,scc,storageclass will now receive these labels. These labels are also used to filter the watch to stop watching for unnecessary objects in the cluster.

On top of this, now LVMVolumeGroupNodeStatus receives OwnerReferences from LVMVolumeGroup. We can later decide to upgrade them to blockOwnerDeletion as well, but currently its a normal OwnerReference (no controller reference to avoid conflicts between multiple volume groups on one NodeStatus). If the volumegroup disappears from the node, so does the owner reference.

Snapshotting was moved to a similar check as SecurityContextConstraints to also allow a watch on the correct snapshot class. Sideeffect: if LVMS is installed after snapshot apis, a manual restart is necessary. For all openshift distros and people aware of this, this shouldnt be an issue since the APIs are usually installed before extension operators.

Also adds an Owns configuration to the LVMCluster for the deployment controller of topo lvm in addition to the already watched daemon set.

Now all resources except for the initially created CSIDriver are watched and reacted to on status.

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
Copy link
Contributor

openshift-ci bot commented Sep 4, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 4, 2023
@jakobmoellerdev
Copy link
Contributor Author

/test all

@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2023

Codecov Report

Merging #405 (e1ef3e4) into main (dd8b3b7) will increase coverage by 0.04%.
The diff coverage is 45.04%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
+ Coverage   57.07%   57.11%   +0.04%     
==========================================
  Files          27       27              
  Lines        2169     2227      +58     
==========================================
+ Hits         1238     1272      +34     
- Misses        846      868      +22     
- Partials       85       87       +2     
Files Changed Coverage Δ
controllers/scc.go 0.00% <0.00%> (ø)
pkg/vgmanager/status.go 0.00% <0.00%> (ø)
pkg/vgmanager/vgmanager_controller.go 11.72% <0.00%> (-0.05%) ⬇️
controllers/lvmcluster_controller_watches.go 64.93% <58.49%> (-12.21%) ⬇️
controllers/lvmcluster_controller.go 63.58% <100.00%> (+0.60%) ⬆️
controllers/topolvm_csi_driver.go 80.00% <100.00%> (+0.51%) ⬆️
controllers/topolvm_snapshotclass.go 84.61% <100.00%> (+13.18%) ⬆️
controllers/topolvm_storageclass.go 85.29% <100.00%> (+0.67%) ⬆️
controllers/vgmanager.go 79.06% <100.00%> (+0.49%) ⬆️

@jakobmoellerdev jakobmoellerdev marked this pull request as ready for review September 4, 2023 15:54
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 4, 2023
@jeff-roche
Copy link
Contributor

jeff-roche commented Sep 5, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 5, 2023
@jeff-roche
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jakobmoellerdev, jeff-roche

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 5, 2023
@jakobmoellerdev jakobmoellerdev force-pushed the OCPBUGS-18354-owns-watches-config-updates branch from e1ef3e4 to a47624b Compare September 7, 2023 08:15
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 7, 2023
@jakobmoellerdev jakobmoellerdev force-pushed the OCPBUGS-18354-owns-watches-config-updates branch from a47624b to d6ebd11 Compare September 7, 2023 08:22
@suleymanakbas91
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 7, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 7, 2023

@jakobmoellerdev: 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.

@suleymanakbas91 suleymanakbas91 merged commit a0a0ae4 into openshift:main Sep 7, 2023
@openshift-ci-robot
Copy link

@jakobmoellerdev: Jira Issue OCPBUGS-18354: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-18354 has been moved to the MODIFIED state.

In response to this:

This updates all cluster-scoped subresources to have 6 new labels useful for filtering and assignments (in place of the usual ownerreference) - csidriver, volumesnapshotclass,scc,storageclass will now receive these labels. These labels are also used to filter the watch to stop watching for unnecessary objects in the cluster.

On top of this, now LVMVolumeGroupNodeStatus receives OwnerReferences from LVMVolumeGroup. We can later decide to upgrade them to blockOwnerDeletion as well, but currently its a normal OwnerReference (no controller reference to avoid conflicts between multiple volume groups on one NodeStatus). If the volumegroup disappears from the node, so does the owner reference.

Snapshotting was moved to a similar check as SecurityContextConstraints to also allow a watch on the correct snapshot class. Sideeffect: if LVMS is installed after snapshot apis, a manual restart is necessary. For all openshift distros and people aware of this, this shouldnt be an issue since the APIs are usually installed before extension operators.

Also adds an Owns configuration to the LVMCluster for the deployment controller of topo lvm in addition to the already watched daemon set.

Now all resources except for the initially created CSIDriver are watched and reacted to on status.

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.

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. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. 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.

5 participants