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

manifests: resources required for adding helm metrics in console #601

Merged

Conversation

zonggen
Copy link
Contributor

@zonggen zonggen commented Oct 5, 2021

Adds a new ServiceMonitor to allow the Helm metrics being scraped from
console /metrics endpoint by prometheus-k8s.

Closes: https://issues.redhat.com/browse/HELM-235
Reference: #270
Signed-off-by: Allen Bai abai@redhat.com

Adds a new ServiceMonitor to allow the Helm metrics being scraped from
console /metrics endpoint by prometheus-k8s.

Closes: https://issues.redhat.com/browse/HELM-235
Reference: openshift#270
Signed-off-by: Allen Bai <abai@redhat.com>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 5, 2021
zonggen pushed a commit to zonggen/console that referenced this pull request Oct 6, 2021
Works with openshift/console-operator#601 to add
a console_helm_install_count counter vector metric. This change will
increment the counter each time a user installs a Helm chart in the
console.

Closes: https://issues.redhat.com/browse/HELM-235
Signed-off-by: Allen Bai <abai@redhat.com>
zonggen pushed a commit to zonggen/console that referenced this pull request Oct 6, 2021
Works with openshift/console-operator#601 to add
a console_helm_install_count counter vector metric. This change will
increment the counter each time a user installs a Helm chart in the
console.

Closes: https://issues.redhat.com/browse/HELM-235
Signed-off-by: Allen Bai <abai@redhat.com>
zonggen pushed a commit to zonggen/console that referenced this pull request Oct 7, 2021
Works with openshift/console-operator#601 to add
a console_helm_install_count counter vector metric. This change will
increment the counter each time a user installs a Helm chart in the
console.

Closes: https://issues.redhat.com/browse/HELM-235
Signed-off-by: Allen Bai <abai@redhat.com>
@zonggen zonggen changed the title [WIP] manifests: resources required for adding helm metrics in console manifests: resources required for adding helm metrics in console Oct 7, 2021
@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 Oct 7, 2021
@zonggen
Copy link
Contributor Author

zonggen commented Oct 7, 2021

Lifted WIP as the console PR is ready and tested: openshift/console#10194

In summary, in this implementation we host a Prometheus client in the console and instructs the service monitor to scrape on console.openshift-console.svc at /metrics. For authentication, console checks for bearer token in the header and rewrites the token into a cookie and feed into the console authenticator (just like how other helm API call cookies are handled in console).

PTAL when you're available @jhadvig @spadgett @dperaza4dustbit.

zonggen pushed a commit to zonggen/console that referenced this pull request Oct 7, 2021
Works with openshift/console-operator#601 to add
a console_helm_install_count counter vector metric. This change will
increment the counter each time a user installs a Helm chart in the
console.

Closes: https://issues.redhat.com/browse/HELM-235
Signed-off-by: Allen Bai <abai@redhat.com>
Copy link
Contributor

@dperaza4dustbit dperaza4dustbit 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 openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 8, 2021
Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

One nit otherwise LGTM 👍
Please address the comment so we can tag the PR :)

include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
roleRef:
# for protected endpoints like /metrics, the operator must perform
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# for protected endpoints like /metrics, the operator must perform
# for protected endpoints like /metrics, the console backend must perform

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review @jhadvig! Updated.

Signed-off-by: Allen Bai <abai@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2021
zonggen pushed a commit to zonggen/console that referenced this pull request Oct 13, 2021
Works with openshift/console-operator#601 to add
a console_helm_install_count counter vector metric. This change will
increment the counter each time a user installs a Helm chart in the
console.

Closes: https://issues.redhat.com/browse/HELM-235
Signed-off-by: Allen Bai <abai@redhat.com>

helm/metrics: update according to code reviews

Signed-off-by: Allen Bai <abai@redhat.com>

helm/metrics: add metrics for helm release upgrades and uninstalls

Signed-off-by: Allen Bai <abai@redhat.com>
zonggen pushed a commit to zonggen/console that referenced this pull request Oct 13, 2021
Works with openshift/console-operator#601 to add
a console_helm_install_count counter vector metric. This change will
increment the counter each time a user installs a Helm chart in the
console.

Closes: https://issues.redhat.com/browse/HELM-235
Signed-off-by: Allen Bai <abai@redhat.com>

helm/metrics: update according to code reviews

Signed-off-by: Allen Bai <abai@redhat.com>

helm/metrics: add metrics for helm release upgrades and uninstalls

Signed-off-by: Allen Bai <abai@redhat.com>
zonggen pushed a commit to zonggen/console that referenced this pull request Oct 13, 2021
Works with openshift/console-operator#601 to add
a console_helm_install_count counter vector metric. This change will
increment the counter each time a user installs a Helm chart in the
console.

Closes: https://issues.redhat.com/browse/HELM-235
Signed-off-by: Allen Bai <abai@redhat.com>

helm/metrics: update according to code reviews

Signed-off-by: Allen Bai <abai@redhat.com>

helm/metrics: add metrics for helm release upgrades and uninstalls

Signed-off-by: Allen Bai <abai@redhat.com>
@zonggen
Copy link
Contributor Author

zonggen commented Oct 13, 2021

/retest

Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@jhadvig
Copy link
Member

jhadvig commented Oct 13, 2021

/retest

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 13, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dperaza4dustbit, jhadvig, zonggen

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 Oct 13, 2021
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

8 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@zonggen
Copy link
Contributor Author

zonggen commented Oct 18, 2021

It seems like this PR is dependent on the metrics PR on console side (openshift/console#10194). Once the console change is merged and new image is built, the warning alert should be resolved.

Tested with applying manifest in this PR, using default console image. As I changed to my console image with metrics change, the targetDown alert is gone:

image

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@jhadvig
Copy link
Member

jhadvig commented Oct 18, 2021

/hold

lets wait for openshift/console#10194

@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 Oct 18, 2021
@jhadvig
Copy link
Member

jhadvig commented Oct 19, 2021

/hold for approvals
/assign @yapei @opayne1 @RickJWagner

@opayne1
Copy link

opayne1 commented Oct 20, 2021

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Oct 20, 2021
@yapei
Copy link
Contributor

yapei commented Oct 26, 2021

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Oct 26, 2021
@RickJWagner
Copy link

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Oct 27, 2021
@zonggen
Copy link
Contributor Author

zonggen commented Oct 28, 2021

/unhold

@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 Oct 28, 2021
@zonggen
Copy link
Contributor Author

zonggen commented Oct 28, 2021

/retest

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 02ba53a into openshift:master Oct 28, 2021
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. docs-approved Signifies that Docs has signed off on this PR lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants