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

Enable the metrics endpoint on the OCI registry container #8

Merged
merged 1 commit into from
Jan 14, 2021

Conversation

johnmcollier
Copy link
Member

@johnmcollier johnmcollier commented Jan 8, 2021

This PR enables the Prometheus metrics endpoint on the OCI registry server. This is done via exporting the OCI server config to a configmap, allowing the registry operator to configure it. This will be handy in the future, should any additional configurations on the OCI server need to be done.

Also, the refactoring of the ensure.go functions has been done, as described by @GeekArthur in #2 (comment).

The metrics endpoint is not publicly exposed. I've pushed the operator image up to my dockerhub account for testing. To Test:

  1. Log in to an OpenShift cluster
  2. Run make install IMG=johncollier/registry-operator:latest
  3. Run make deploy IMG=johncollier/registry-operator:latest
  4. Run oc apply -f registry.yaml
  5. Run oc exec <registry-pod> -c devfile-registry-bootstrap -- curl localhost:5001/metrics (the OCI server doesn't have curl installed, so we're using the index/bootstrap container to run the command)

Signed-off-by: John Collier jcollier@redhat.com

Enables the Prometheus metrics endpoint on the OCI registry server. This is done via exporting the server config to a configmap, allowing the registry operator to set the

Also does some refactoring of the ensure code.

Signed-off-by: John Collier <jcollier@redhat.com>
Copy link
Contributor

@GeekArthur GeekArthur left a comment

Choose a reason for hiding this comment

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

Thanks for refactoring the code and enabling the metrics, LGTM!

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: GeekArthur, johnmcollier
To complete the pull request process, please assign after the PR has been reviewed.
You can assign the PR to them by writing /assign in a comment when ready.

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

@johnmcollier johnmcollier merged commit 34c367c into devfile:main Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants