Skip to content

Commit

Permalink
Merge branch 'main' into minor_tx_processing_improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Olshansk committed May 23, 2023
2 parents e1f26d7 + cb0a0ab commit bb643d2
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 70 deletions.
62 changes: 0 additions & 62 deletions .github/workflows/e2e-test.yml

This file was deleted.

69 changes: 63 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
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 }}"
4 changes: 4 additions & 0 deletions charts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.0.5] - 2023-05-20

- Added `ServiceMonitor` to the helm chart.

## [0.0.0.4] - 2023-05-12

- Added `nodeType` parameter to the helm chart, which is now actor-agnostic.
Expand Down
1 change: 1 addition & 0 deletions charts/pocket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,5 @@ privateKeySecretKeyRef:
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| serviceMonitor.enabled | bool | `false` | enable service monitor |
| tolerations | list | `[]` | |
12 changes: 12 additions & 0 deletions charts/pocket/templates/service-monitor.yaml
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 }}
6 changes: 4 additions & 2 deletions charts/pocket/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ spec:
- -config=/pocket/configs/config.json
- -genesis=/pocket/configs/genesis.json
ports:
- containerPort: 42069
- containerPort: {{ .Values.service.ports.consensus }}
name: consensus
- containerPort: 50832
- containerPort: {{ .Values.service.ports.rpc }}
name: rpc
- containerPort: {{ .Values.service.ports.metrics }}
name: metrics
env:
{{ if or .Values.privateKeySecretKeyRef.name .Values.privateKeySecretKeyRef.key }}
- name: POCKET_PRIVATE_KEY
Expand Down
6 changes: 6 additions & 0 deletions charts/pocket/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ service:
annotations: {}
# -- 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
Expand All @@ -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
Expand Down

0 comments on commit bb643d2

Please sign in to comment.