-
Notifications
You must be signed in to change notification settings - Fork 33
[Helm] Add ServiceMonitor to the helm chart #767
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
Changes from all commits
ad1fbbe
66809fb
3c3cfe7
148ece9
467996b
c57c6e8
ff95548
63cc793
b326e50
b3b8aaf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,13 +6,15 @@ on: | |
| workflow_dispatch: | ||
| push: | ||
| branches: [main] | ||
| paths-ignore: | ||
| - "docs/**" | ||
| - "**.md" | ||
| # OPTIMIZE: We generate new images even on non src code changes, but this cost is okay for now | ||
| # paths-ignore: | ||
| # - "docs/**" | ||
| # - "**.md" | ||
| pull_request: | ||
| paths-ignore: | ||
| - "docs/**" | ||
| - "**.md" | ||
| # paths-ignore: | ||
| # - "docs/**" | ||
| # - "**.md" | ||
|
|
||
|
|
||
| env: | ||
| # Even though we can test against multiple versions, this one is considered a target version. | ||
|
|
@@ -151,3 +153,58 @@ jobs: | |
| cache-to: type=gha,mode=max | ||
| build-args: | | ||
| TARGET_GOLANG_VERSION=${{ env.TARGET_GOLANG_VERSION }} | ||
|
|
||
|
|
||
| # Run e2e tests on devnet if the PR has a label "e2e-devnet-test" | ||
| e2e-tests: | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I missed a clarification in the Github Actions documentation that old implementation would only work on the default branch, so having a separate workflow did not work. Going to have a larger main workflow instead. |
||
| runs-on: ubuntu-latest | ||
| needs: build-images | ||
| if: contains(github.event.pull_request.labels.*.name, 'e2e-devnet-test') | ||
| env: | ||
| ARGO_HTTP1: true | ||
| ARGO_SECURE: true | ||
| ARGO_SERVER: ${{ vars.ARGO_SERVER }} | ||
| permissions: | ||
| contents: "read" | ||
| id-token: "write" | ||
|
|
||
| steps: | ||
| - id: "auth" | ||
| uses: "google-github-actions/auth@v1" | ||
| with: | ||
| credentials_json: "${{ secrets.ARGO_WORKFLOW_EXTERNAL }}" | ||
|
|
||
| - id: "get-credentials" | ||
| uses: "google-github-actions/get-gke-credentials@v1" | ||
| with: | ||
| cluster_name: "nodes-gcp-dev-us-east4-1" | ||
| location: "us-east4" | ||
|
|
||
| - id: "install-argo" | ||
| run: | | ||
| curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.4.7/argo-linux-amd64.gz | ||
| gunzip argo-linux-amd64.gz | ||
| chmod +x argo-linux-amd64 | ||
| mv ./argo-linux-amd64 /usr/local/bin/argo | ||
| argo version | ||
|
|
||
| - id: "wait-for-infra" | ||
| shell: bash | ||
| run: | | ||
| start_time=$(date +%s) # store current time | ||
| timeout=900 # 15 minute timeout in seconds | ||
|
|
||
| until argo template get dev-e2e-tests --namespace=devnet-issue-${{ github.event.pull_request.number }}; do | ||
| current_time=$(date +%s) | ||
| elapsed_time=$(( current_time - start_time )) | ||
| if (( elapsed_time > timeout )); then | ||
| echo "Timeout of $timeout seconds reached. Exiting..." | ||
| exit 1 | ||
| fi | ||
| echo "Waiting for devnet-issue-${{ github.event.pull_request.number }} to be provisioned..." | ||
| sleep 5 | ||
| done | ||
|
|
||
| - id: "run-e2e-tests" | ||
| run: | | ||
| argo submit --wait --log --namespace devnet-issue-${{ github.event.pull_request.number }} --from 'wftmpl/dev-e2e-tests' --parameter gitsha="${{ github.event.pull_request.head.sha }}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| {{ if .Values.serviceMonitor.enabled }} | ||
| apiVersion: monitoring.coreos.com/v1 | ||
| kind: ServiceMonitor | ||
| metadata: | ||
| name: {{ include "pocket.fullname" . }} | ||
| spec: | ||
| endpoints: | ||
| - port: metrics | ||
| selector: | ||
| matchLabels: | ||
| {{- include "pocket.selectorLabels" . | nindent 6 }} | ||
| {{ end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -170,6 +170,8 @@ service: | |
| annotations: {} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| # -- service type | ||
| type: ClusterIP | ||
|
|
||
| # If adjusting values here, please make sure to also change the configuration of the pocket node (`config` section above) | ||
| ports: | ||
| # -- consensus port of the node | ||
| consensus: 42069 | ||
|
|
@@ -178,6 +180,10 @@ service: | |
| # -- OpenTelemetry metrics port of the node | ||
| metrics: 9000 | ||
|
|
||
| serviceMonitor: | ||
| # -- enable service monitor | ||
| enabled: false | ||
|
|
||
| ingress: | ||
| # -- enable ingress for RPC port | ||
| enabled: false | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we now depend on the most recent gitsha from the pull request (PR) to include a container image, we should not hinder the continuous integration (CI) process from generating an image in cases where only a documentation change is made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you leave an inline comment. Maybe something like
OPTIMIZE: We generate new images even on non src code changes, but this cost is okay for now