Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Add manifests to enable metrics-collector running independently #36

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

Conversation

clyang82
Copy link
Contributor

@clyang82 clyang82 commented Jun 11, 2021

https://github.com/open-cluster-management/backlog/issues/11875

Have this PR to enable running metrics-collector independently.

You need to replace the following variable before applying to an environment:

  • ${CLUSTER_NAME} to your cluster name
  • ${CLUSTER_ID} you can get by oc get clusterversions -o jsonpath="{.items[0].spec.clusterID}"
  • ${OBSERVATORIUM_RECEIVER_URL} is your hub cluster you want to push metrics. You can get the observatorium route api by running oc get route -n open-cluster-management-observability observatorium-api and append /api/metrics/v1/default/api/v1/receive to form the final url.
  • ${CA_CRT} ${TLS_CRT} ${TLS_KEY} are used to authenticate with observatorium api. You can get the content by running in your hub cluster oc get secret -n open-cluster-management-addon-observability observability-managed-cluster-certs -oyaml.
  • ${METRICS_COLLECTOR_IMAGE} to point metrics-collector image. e.g.: quay.io/open-cluster-management/metrics-collector:2.3.0-SNAPSHOT-2021-06-08-08-29-28

Signed-off-by: clyang82 [email protected]

@openshift-ci
Copy link

openshift-ci bot commented Jun 11, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clyang82

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

@gurnben
Copy link
Member

gurnben commented Jun 11, 2021

Looks good to me! One question - can you determine the ClusterID from the command-line via oc? I haven't attempted to get that info before!

@clyang82
Copy link
Contributor Author

Looks good to me! One question - can you determine the ClusterID from the command-line via oc? I haven't attempted to get that info before!

updated in description. oc get clusterversions -o jsonpath="{.items[0].spec.clusterID}"

@clyang82 clyang82 changed the title [WIP]Add manifests to enable metrics-collector running independently Add manifests to enable metrics-collector running independently Jun 16, 2021
Signed-off-by: clyang82 <[email protected]>
@clyang82
Copy link
Contributor Author

/assign @haoqing0110

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@haoqing0110
Copy link
Member

haoqing0110 commented Jun 17, 2021

Just one concern is, we also have a depoloyment in https://github.com/open-cluster-management/metrics-collector/blob/main/test/integration/manifests/deployment.yaml. Is that possible to only maintain one?

@clyang82
Copy link
Contributor Author

Just one concern is, we also have a depoloyment in https://github.com/open-cluster-management/metrics-collector/blob/main/test/integration/manifests/deployment.yaml. Is that possible to only maintain one?

👍 Yes. I did not realize we have it in integration folder. Let me update it in integration folder.

@clyang82
Copy link
Contributor Author

clyang82 commented Jul 1, 2021

Right now, it is hardcoded for openshift. If you want to have it worked in *KS, you need to update

        - --from=$(FROM)
        - --from-ca-file=/etc/serving-certs-ca-bundle/service-ca.crt
        - --from-token-file=/var/run/secrets/kubernetes.io/serviceaccount/token

@gurnben
Copy link
Member

gurnben commented Jul 12, 2021

Right now, it is hardcoded for openshift. If you want to have it worked in *KS, you need to update

        - --from=$(FROM)
        - --from-ca-file=/etc/serving-certs-ca-bundle/service-ca.crt
        - --from-token-file=/var/run/secrets/kubernetes.io/serviceaccount/token

Sorry for the sluggish reply - we're just now scheduling this task - what modification would we need to make to these values to support *KS?

@gurnben gurnben self-assigned this Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants