chore(helm/charts): import erpc from morpho-infra-helm#90
Open
rguichard wants to merge 5 commits into
Open
Conversation
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
3db6a38 to
631f9ad
Compare
631f9ad to
7cad0d6
Compare
0x666c6f
reviewed
Jun 24, 2026
7cad0d6 to
7cadc0e
Compare
This was referenced Jun 25, 2026
Apply the fixes from the per-finding review branches directly: validate-helm-charts.sh: - process_chart now returns instead of exit, so the sequential loop validates every chart and reaches the summary (the parallel path is unaffected). - Use a single `mktemp -d` dir (lint/template files) instead of an unused base temp file; clean up with one `rm -rf`. - Pass the chart path to `helm dependency update` / `helm template` instead of cd-ing into the dir; drop the now-unused INITIAL_DIR. - Split the `helm template | kubeconform` pipeline for readability (keeping the `if !` guard, which is pipefail-safe). test-local.sh: - Redact LABELS_SERVICE_API_KEY when echoing the auth response. - Correct the eth_getLogs decimal block numbers (0x1254048f = 307,496,079, 0x12558b2f = 307,596,079, range = 100,000). The Aikido suggestion to move should_skip_validation before `helm lint` was intentionally not applied: lint is meant to run for all charts; only kubeconform is skipped for database charts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- CODEOWNERS: add @0x666c6f as a mandatory codeowner alongside the teams, on every pattern (incl. /helm/) so he is a required reviewer repo-wide, not only for files matching the default `*` rule. - values.yaml: bump erpc and erpc-validator image tags 0.0.77 -> 0.1.3 to match the latest prd values in morpho-org/morpho-infra-helm. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6553bf2 to
a8d49f2
Compare
Collaborator
Author
|
@0x666c6f do you know why agent-harness is failing ? I ran ./scripts/agent-harness/update-repo-map.sh but the file was already up to date |
Collaborator
|
Fixed in 7dd92d7. Root cause: Fix: force deterministic case-insensitive ordering with ./scripts/agent-harness/update-repo-map.sh
make agent-check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR brings the eRPC Helm chart and its production environment configuration into this repository, consolidating application-level deployment config alongside the application code rather than keeping it in a separate infrastructure repository. The migration covers the full production topology: multiple eRPC instances, HAProxy smart load balancers with Prometheus-driven weight and fallback controllers, Redis HA, and a CNPG-managed PostgreSQL cluster.
Two companion fixes are included: security hardening of the validation scripts based on an Aikido review, and bumping the eRPC and erpc-validator image tags to
0.1.3to match the latest production values.Changes
New Helm chart —
helm/charts/erpc/__SECRET_<KEY>__placeholders and generates per-key auth strategies fromAPI_KEY_*entries; an optional dedicated validation init-container (vault.validationImage) runserpc validatebefore the secret is stored in Kubernetes.pg-erpc.yaml) with volume-snapshot or Barman S3 backup, custom autovacuum/checkpoint tuning, and a recovery health monitoring ConfigMap.securityHardening.enabled) implementing the Pod Security Standardsrestrictedprofile (non-root, read-only rootfs, dropped capabilities, seccomp RuntimeDefault).docker-compose.yml,.env.example, andtest-local.sh.Production environment wrapper —
helm/environments/prd/erpc/erpc,erpc-dev,erpc-fallback,erpc-processing,erpc-router), each with independent Vault config paths, resource profiles, and per-instance runtime ServiceAccounts.erpc-haproxy,erpc-processing-haproxy,erpc-router-haproxy), each carrying two sidecar controllers: aweight-controllerthat adjusts per-pod backend weights using goroutine count, P99 latency, request rate, and CPU metrics; and afallback-controllerthat gradually activates the hot-standby fallback pool on sustained degradation and immediately on total outage.PrometheusRulewith recording rules across histogram families, counters, and gauges; latency percentile rules; fallback traffic share rules; and alerting rules for high fallback traffic and actionable failure rates.CI/CD and repo governance
.github/CODEOWNERS: platform-engineers and@0x666c6fas mandatory reviewers on all patterns including/helm/..github/workflows/helm-charts-validation.yaml: three-job pipeline — chart discovery, parallelhelm lint+ kubeconform validation (with database chart skip logic), summary gate..github/workflows/slack-pr-notification.yaml: Slack notification on merge tomorpho-main, skipping bot authors..github/workflows/wiz-iac-scan.yml: Wiz CLI IaC scan triggered on PRs touchinghelm/.validate-helm-charts.sh: local script mirroring CI validation, with GNUparallelsupport and sequential fallback.Aikido security fixes
validate-helm-charts.sh:process_chartusesreturninstead ofexitso the sequential loop always reaches the summary; singlemktemp -dwith unified cleanup viarm -rf; chart path passed directly tohelm dependency update/helm templateinstead ofcd-ing;helm template | kubeconformpipeline split for correct exit-code propagation.test-local.sh:LABELS_SERVICE_API_KEYredacted when echoing the auth response;eth_getLogsblock numbers corrected to a valid 100 000-block range on Arbitrum.Image version bump
values.yaml:erpcanderpc-validatorimage tags updated from0.0.77to0.1.3.Testing
Local validation script
Both the base chart and the prd environment wrapper should report lint and kubeconform passes;
erpc-dband any*postgres*charts are intentionally skipped by kubeconform.CI
Push or open a PR touching
helm/**— theHelm Chart Validationworkflow runs chart discovery, parallel validation, and a summary job that fails the check if any chart fails.Local Docker Compose (eRPC chart)
All seven test cases (health, Ethereum/Arbitrum/Base RPC, auth enforcement,
eth_getLogs, DynamoDB note) should pass.Edge cases to verify
dependencies:inChart.yamlcorrectly triggershelm dependency updatebefore template rendering.process_chartfailures in sequential mode do not abort validation of subsequent charts (thereturnfix).LABELS_SERVICE_API_KEYis configured; the rejection response does not echo the key back in test output.Codex follow-up
agent-harnessrepo-map drift by makingscripts/review-repo-map.shuse deterministic case-insensitive sorting:LC_ALL=C sort -f -u.persist-credentials: falsein Helm validation and Wiz IaC workflows../scripts/agent-harness/update-repo-map.shandmake agent-check.