Skip to content

NO-JIRA: Normalize generation of driver metrics RBAC proxy sidecar #380

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

stephenfin
Copy link
Contributor

The generator has the ability to generate kube-rbac-proxy sidecar containers when exposing driver metrics on the controller or node.
In #379, we noted that while the sidecar containers templates used template variables, the actual driver template used hardcoded strings. This allows for the possibility of bugs if the port numbers are changed at any point.
Resolve this by modifying the generator such that the metric port for the drivers is now templated also. Changes are implemented in multiple steps: I'd encourage reviewers to look at the individual commits.

This includes the commits from #379 and that can as such be considered a dependency.

Dependencies:

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 15, 2025
@openshift-ci-robot
Copy link

@stephenfin: This pull request explicitly references no jira issue.

In response to this:

The generator has the ability to generate kube-rbac-proxy sidecar containers when exposing driver metrics on the controller or node.
In #379, we noted that while the sidecar containers templates used template variables, the actual driver template used hardcoded strings. This allows for the possibility of bugs if the port numbers are changed at any point.
Resolve this by modifying the generator such that the metric port for the drivers is now templated also. Changes are implemented in multiple steps: I'd encourage reviewers to look at the individual commits.

This includes the commits from #379 and that can as such be considered a dependency.

Dependencies:

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.

@openshift-ci openshift-ci bot requested review from dobsonj and mandre April 15, 2025 14:07
Copy link
Contributor

openshift-ci bot commented Apr 15, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: stephenfin
Once this PR has been reviewed and has the lgtm label, please assign jsafrane for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@stephenfin stephenfin force-pushed the cleanup-driver-metrics branch from 9ebb32d to 4c9db2b Compare May 14, 2025 11:08
@stephenfin
Copy link
Contributor Author

/retest

No need to use a slice.

Signed-off-by: Stephen Finucane <[email protected]>
The 'InjectKubeRBACProxy' field was was always set to True in users and
was therefore a no-op. The 'Name' field was likewise always set to
'driver-m' and doesn't need to be templated. Flatten the remaining two
fields into the parent structs are remove MetricsPorts entirely.

Signed-off-by: Stephen Finucane <[email protected]>
This aligns us closer with the other sidecar containers own metrics
sidecars. This is also, coincidentally, the first and only change in the
series of changes that actually has an effect on the generated assets.

Signed-off-by: Stephen Finucane <[email protected]>
@stephenfin stephenfin force-pushed the cleanup-driver-metrics branch from 4c9db2b to 917c3be Compare May 30, 2025 10:48
@stephenfin
Copy link
Contributor Author

/uncc @dobsonj
/cc @gnufied
/cc @mandre

@openshift-ci openshift-ci bot requested review from gnufied and mandre and removed request for dobsonj May 30, 2025 10:49
Copy link
Contributor

openshift-ci bot commented May 30, 2025

@stephenfin: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-azurestack-csi 917c3be link false /test e2e-azurestack-csi
ci/prow/e2e-openstack-cinder-csi 917c3be link true /test e2e-openstack-cinder-csi
ci/prow/smb-win2019-operator-e2e 917c3be link false /test smb-win2019-operator-e2e
ci/prow/smb-win2022-operator-e2e 917c3be link false /test smb-win2022-operator-e2e
ci/prow/hypershift-e2e-openstack-aws-csi-cinder 917c3be link true /test hypershift-e2e-openstack-aws-csi-cinder
ci/prow/hypershift-e2e-aks 917c3be link true /test hypershift-e2e-aks
ci/prow/e2e-openstack 917c3be link false /test e2e-openstack

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants