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

refactor: Updating the configmap setup to take any ENV that is in the .Values.c… #1732

Merged
merged 3 commits into from
May 11, 2024

Conversation

rustyShacklefurd
Copy link
Contributor

@rustyShacklefurd rustyShacklefurd commented Sep 11, 2023

…onfig for the corresponding chart of relay or relay-websockets

Description:
Moving the configmap for relay and relay-websockets charts to pull in any value that is being set. This will allow for expanding the confi variables deployed without needing to update the chart(s) each time to include the corresponding config update. Now any new variables that are added to .Values.config of each chart will be included in the update

Related issue(s):
N/A

Notes for reviewer:
this is the contents of the configmap generated using the following deploy command:

helm install relay-deploy-test2 charts/hedera-json-rpc-relay --set config.MIRROR_NODE_URL=http://fullstack-deployment-rest --set config.MIRROR_NODE_URL_WEB3=http://fullstack-deployment-web3 --set config.CHAIN_ID=298 --set config.LOG_LEVEL=debug --set config.HEDERA_NETWORK=previewnet --set image.tag=main
k get configmaps relay-deploy-test2-hedera-json-rpc-relay -o yaml
apiVersion: v1
data:
  CHAIN_ID: "298"
  CLIENT_TRANSPORT_SECURITY: "false"
  CONSENSUS_MAX_EXECUTION_TIME: "15000"
  CONTRACT_QUERY_TIMEOUT_RETRIES: "3"
  DEBUG_API_ENABLED: "false"
  DEFAULT_RATE_LIMIT: "200"
  DEV_MODE: "false"
  ETH_CALL_CACHE_TTL: "200"
  ETH_CALL_DEFAULT_TO_CONSENSUS_NODE: "false"
  ETH_GET_LOGS_BLOCK_RANGE_LIMIT: "1000"
  FILTER_API_ENABLED: "true"
  GAS_PRICE_TINY_BAR_BUFFER: "10000000000"
  HAPI_CLIENT_DURATION_RESET: "3600000"
  HAPI_CLIENT_ERROR_RESET: '[50]'
  HAPI_CLIENT_TRANSACTION_RESET: "50"
  HBAR_RATE_LIMIT_DURATION: "60000"
  HBAR_RATE_LIMIT_TINYBAR: "5000000000"
  HEDERA_NETWORK: previewnet
  INPUT_SIZE_LIMIT: "1"
  LIMIT_DURATION: "60000"
  LOG_LEVEL: debug
  MIRROR_NODE_LIMIT_PARAM: "100"
  MIRROR_NODE_RETRIES: "3"
  MIRROR_NODE_RETRY_DELAY: "250"
  MIRROR_NODE_URL: http://fullstack-deployment-rest
  MIRROR_NODE_URL_WEB3: http://fullstack-deployment-web3
  MULTI_SET: "true"
  OPERATOR_ID_ETH_SENDRAWTRANSACTION: ""
  OPERATOR_ID_MAIN: ""
  OPERATOR_KEY_ETH_SENDRAWTRANSACTION: ""
  OPERATOR_KEY_MAIN: ""
  RATE_LIMIT_DISABLED: "false"
  REDIS_ENABLED: "false"
  REDIS_RECONNECT_DELAY_MS: "1000"
  REDIS_URL: ""
  SDK_REQUEST_TIMEOUT: "10000"
  SERVER_PORT: "7546"
  SUBSCRIPTIONS_ENABLED: "false"
  TIER_1_RATE_LIMIT: "100"
  TIER_2_RATE_LIMIT: "200"
  TIER_3_RATE_LIMIT: "400"
  WEB_SOCKET_PORT: "8546"
kind: ConfigMap
metadata:
  annotations:
    meta.helm.sh/release-name: relay-deploy-test2
    meta.helm.sh/release-namespace: default
  creationTimestamp: "2024-05-11T04:31:48Z"
  labels:
    app: hedera-json-rpc-relay
    app.kubernetes.io/instance: relay-deploy-test2
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: hedera-json-rpc-relay
    app.kubernetes.io/version: 0.48.0-SNAPSHOT
    helm.sh/chart: hedera-json-rpc-relay-0.48.0-SNAPSHOT
  name: relay-deploy-test2-hedera-json-rpc-relay
  namespace: default
  resourceVersion: "419"
  uid: be6cf576-06bf-446b-8fec-3dd73a072898

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    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
0.0% 0.0% Duplication

AlfredoG87
AlfredoG87 previously approved these changes Sep 11, 2023
Copy link
Collaborator

@AlfredoG87 AlfredoG87 left a comment

Choose a reason for hiding this comment

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

Looks good, just one question.

@AlfredoG87
Copy link
Collaborator

don't worry about test: Charts / install (pull_request) Failing after 2m
we know that one is currently failing not related to your change @rustyShacklefurd

Nana-EC
Nana-EC previously approved these changes Sep 13, 2023
@rustyShacklefurd
Copy link
Contributor Author

Before adding this to "ready for review" I am going to test the rollout from one type of configmap setup to the other. If there are steps needed for this conversion they'll be documented.

@AlfredoG87 AlfredoG87 added enhancement New feature or request P2 labels Sep 13, 2023
@AlfredoG87 AlfredoG87 added this to the 0.32.0 milestone Sep 13, 2023
@Nana-EC
Copy link
Collaborator

Nana-EC commented Sep 16, 2023

@Nana-EC Nana-EC modified the milestones: 0.32.0, 0.33.0 Sep 16, 2023
@Nana-EC Nana-EC added the process Build, test and deployment-process related tasks label Sep 16, 2023
@ebadiere ebadiere modified the milestones: 0.33.0, 0.34.0 Oct 3, 2023
@AlfredoG87 AlfredoG87 modified the milestones: 0.34.0, 0.35.0 Oct 17, 2023
@Nana-EC Nana-EC modified the milestones: 0.35.0, 0.40.0 Dec 26, 2023
@AlfredoG87 AlfredoG87 removed this from the 0.40.0 milestone Jan 22, 2024
…onfig for the corresponding chart of relay or relay-websockets

Signed-off-by: Matt Halder <[email protected]>
@AlfredoG87 AlfredoG87 dismissed stale reviews from Nana-EC and themself via 7cd14b2 May 11, 2024 02:12
@AlfredoG87 AlfredoG87 force-pushed the hashio-use-all-envs branch from 3175e4b to 7cd14b2 Compare May 11, 2024 02:12
Copy link

github-actions bot commented May 11, 2024

Acceptance Tests

     23 files     337 suites   34m 52s ⏱️
   576 tests    565 ✔️   3 💤   8
1 354 runs  1 326 ✔️ 13 💤 15

Results for commit f0acd76.

♻️ This comment has been updated with latest results.

…mically.

fix unmarshalling issue with previous approach

Signed-off-by: Alfredo Gutierrez <[email protected]>
…mically.

fix unmarshalling issue with previous approach

Signed-off-by: Alfredo Gutierrez <[email protected]>
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

Tests

    2 files  147 suites   13s ⏱️
819 tests 818 ✔️ 1 💤 0
831 runs  830 ✔️ 1 💤 0

Results for commit f0acd76.

@AlfredoG87
Copy link
Collaborator

Follow up Issue for further cleaning the env charts:

#2476

@AlfredoG87 AlfredoG87 changed the title Updating the configmap setup to take any ENV that is in the .Values.c… refactor: Updating the configmap setup to take any ENV that is in the .Values.c… May 11, 2024
@AlfredoG87
Copy link
Collaborator

@rustyShacklefurd looks like issues with unmarshalling the configmap https://github.com/hashgraph/hedera-json-rpc-relay/actions/runs/6150701624/job/16689227051?pr=1732

@Nana-EC I was able to fix the issue of unmarshalling and also test it manually to make sure it works, added ENV variable: MIRROR_NODE_URL_WEB3 and took a look at the logs, and the expected value is now being set.

[2024-05-11 02:50:45.027 +0000] INFO (mirror-node/62 on relay-deploy-test2-hedera-json-rpc-relay-65ddd496c4-5gglz): Mirror Node client successfully configured to REST url: http://fullstack-deployment-rest/api/v1/ and Web3 url: http://fullstack-deployment-web3/api/v1/ 

@AlfredoG87 AlfredoG87 marked this pull request as ready for review May 11, 2024 04:10
@AlfredoG87 AlfredoG87 requested a review from a team as a code owner May 11, 2024 04:10
@AlfredoG87 AlfredoG87 requested a review from acuarica May 11, 2024 04:10
@AlfredoG87 AlfredoG87 self-assigned this May 11, 2024
@AlfredoG87 AlfredoG87 added this to the 0.48.0 milestone May 11, 2024
@AlfredoG87 AlfredoG87 merged commit e9193fb into main May 11, 2024
34 of 35 checks passed
@AlfredoG87 AlfredoG87 deleted the hashio-use-all-envs branch May 11, 2024 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 process Build, test and deployment-process related tasks
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants