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

SREP-1549: Export metrics for GroupPermissions #15

Merged
merged 8 commits into from
Aug 15, 2019

Conversation

lisa
Copy link
Contributor

@lisa lisa commented Aug 15, 2019

Uses the new https://github.com/openshift/operator-custom-metrics (at v0.2.0 presently) to expose two metrics:

  • rbac_permissions_operator_cluster_permission
  • rbac_permissions_operator_namespace_permission

Each has labels to indicate the various state of the CR.

Signed-off-by: Lisa Seelye lseelye@redhat.com

Uses the new https://github.com/openshift/operator-custom-metrics (at v0.2.0 presently) to expose two metrics:

* `rbac_permissions_operator_cluster_permission`
* `rbac_permissions_operator_namespace_permission`

Each has labels to indicate the various state of the CR.

Signed-off-by: Lisa Seelye <lseelye@redhat.com>
@lisa lisa added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 15, 2019
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 15, 2019
Signed-off-by: Lisa Seelye <lseelye@redhat.com>
@liamwazherealso
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2019
cmd/manager/main.go Outdated Show resolved Hide resolved
Name: "rbac_permissions_operator_namespace_permission",
Help: "Configured permissions in a per-namespace scope",
}, []string{
"group_name",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a lot of labels. If anyone these change value that's a new permission. Are all of these needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fahlmant Right now the labels are mapping to the attributes in the CR for the namespace permission. It's possible we find over time they're not all needed, but for now, I think they're needed. That said, I could see removing "state" as it could be seen as redundant.

Signed-off-by: Lisa Seelye <lseelye@redhat.com>
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2019
Signed-off-by: Lisa Seelye <lseelye@redhat.com>
@lisa lisa requested a review from fahlmant August 15, 2019 15:45
@lisa
Copy link
Contributor Author

lisa commented Aug 15, 2019

This PR is on hold for openshift/operator-custom-metrics#18 to be merged and tagged as v2.0.1.

Signed-off-by: Lisa Seelye <lseelye@redhat.com>
@lisa lisa requested a review from fahlmant August 15, 2019 18:53
cmd/manager/main.go Outdated Show resolved Hide resolved
Signed-off-by: Lisa Seelye <lseelye@redhat.com>
Signed-off-by: Lisa Seelye <lseelye@redhat.com>
Copy link
Contributor

@fahlmant fahlmant left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fahlmant, liamwazherealso, lisa

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

@lisa lisa merged commit 5baf2ed into openshift:master Aug 15, 2019
@lisa lisa removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 15, 2019
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. 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.

4 participants