Skip to content

Conversation

jcantrill
Copy link
Contributor

Description

This PR:

  • Fixes the prometheus roles to be namespace scoped

Links

Copy link
Contributor

@periklis periklis left a comment

Choose a reason for hiding this comment

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

LGTM, but did you forget to generate the bundle maybe?

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 14, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcantrill

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 Mar 14, 2022
@jcantrill
Copy link
Contributor Author

LGTM, but did you forget to generate the bundle maybe?

Ran make target but it appears it updated files outside of the changes I was targeting

Copy link
Contributor

@periklis periklis left a comment

Choose a reason for hiding this comment

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

One more thing, you need to ensure that you manual delete the old clusterrole and clusterrolebinding from the bundle and manifests dir.

@periklis
Copy link
Contributor

LGTM, but did you forget to generate the bundle maybe?

Ran make target but it appears it updated files outside of the changes I was targeting

Looks like people don't treat the bundle dir with care.

@jcantrill
Copy link
Contributor Author

One more thing, you need to ensure that you manual delete the old clusterrole and clusterrolebinding from the bundle and manifests dir.

@periklis I believe this change does accomplish removing those roles/bindings. Existing deployments I do not believe will be updated to remove them. I think this change also moves us one step closer to being able to remove the manifest directory

@jcantrill
Copy link
Contributor Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 15, 2022
@jcantrill
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 15, 2022
@periklis
Copy link
Contributor

One more thing, you need to ensure that you manual delete the old clusterrole and clusterrolebinding from the bundle and manifests dir.

@periklis I believe this change does accomplish removing those roles/bindings. Existing deployments I do not believe will be updated to remove them. I think this change also moves us one step closer to being able to remove the manifest directory

Nope the make bundle command does not remove the ClusterRole and ClusterRoleBinding files at all. At the current SHA1 for this PR, the file still exists: https://github.com/openshift/cluster-logging-operator/blob/ba4354322a6be05457b25543af1752462bad2a24/bundle/manifests/cluster-logging-metadata-reader_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml

@jcantrill
Copy link
Contributor Author

One more thing, you need to ensure that you manual delete the old clusterrole and clusterrolebinding from the bundle and manifests dir.

@periklis I believe this change does accomplish removing those roles/bindings. Existing deployments I do not believe will be updated to remove them. I think this change also moves us one step closer to being able to remove the manifest directory

Nope the make bundle command does not remove the ClusterRole and ClusterRoleBinding files at all. At the current SHA1 for this PR, the file still exists: https://github.com/openshift/cluster-logging-operator/blob/ba4354322a6be05457b25543af1752462bad2a24/bundle/manifests/cluster-logging-metadata-reader_rbac.authorization.k8s.io_v1_clusterrolebinding.yaml

This is the role the collector uses to talk to the API server, not for prometheus to scrap the collector. Interestingly though I wonder if we can reduce it to a namespaces role or if you require clusterwide in order to get pod meta from any pod across the cluster

@jcantrill
Copy link
Contributor Author

/retest

2 similar comments
@jcantrill
Copy link
Contributor Author

/retest

@jcantrill
Copy link
Contributor Author

/retest

@vimalk78
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 17, 2022

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

@openshift-merge-robot openshift-merge-robot merged commit 9e526ed into openshift:master Mar 17, 2022
@jcantrill jcantrill deleted the log1713 branch March 17, 2022 17:15
@jcantrill
Copy link
Contributor Author

/cherrypick release-5.4

@openshift-cherrypick-robot

@jcantrill: #1383 failed to apply on top of branch "release-5.4":

Applying: LOG-1713: fix prometheus roles to be namespaced scoped
.git/rebase-apply/patch:330: trailing whitespace.
  namespace: openshift-monitoring 
.git/rebase-apply/patch:495: trailing whitespace.
  namespace: openshift-monitoring 
warning: 2 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	bundle/manifests/cluster-logging-operator-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml
M	config/rbac/kustomization.yaml
A	manifests/5.5/0100_clusterroles.yaml
A	manifests/5.5/0110_clusterrolebindings.yaml
A	manifests/5.5/cluster-logging-operator-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml
A	manifests/5.5/logging.openshift.io_clusterlogforwarders_crd.yaml
Falling back to patching base and 3-way merge...
Auto-merging manifests/5.4/cluster-logging-operator-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml
CONFLICT (rename/rename): Rename "manifests/5.5/0110_clusterrolebindings.yaml"->"manifests/5.4/0110_clusterrolebindings.yaml" in branch "HEAD" rename "manifests/5.5/0110_clusterrolebindings.yaml"->"bundle/manifests/prometheus_rbac.authorization.k8s.io_v1_rolebinding.yaml" in "LOG-1713: fix prometheus roles to be namespaced scoped"
CONFLICT (rename/rename): Rename "manifests/5.5/0100_clusterroles.yaml"->"manifests/5.4/0100_clusterroles.yaml" in branch "HEAD" rename "manifests/5.5/0100_clusterroles.yaml"->"config/rbac/prometheus_role.yaml" in "LOG-1713: fix prometheus roles to be namespaced scoped"
Auto-merging config/rbac/kustomization.yaml
CONFLICT (content): Merge conflict in config/rbac/kustomization.yaml
Auto-merging bundle/manifests/cluster-logging-operator-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 LOG-1713: fix prometheus roles to be namespaced scoped
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-5.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.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants