Skip to content

feat(plugin-br-pix-switch): add adapter-lerian components - #1720

Open
guimoreirar wants to merge 1 commit into
mainfrom
feat/plugin-br-pix-switch
Open

feat(plugin-br-pix-switch): add adapter-lerian components#1720
guimoreirar wants to merge 1 commit into
mainfrom
feat/plugin-br-pix-switch

Conversation

@guimoreirar

Copy link
Copy Markdown
Member

feat(plugin-br-pix-switch): add adapter-lerian components

Segregated from develop as its own PR to main (chart change only; Chart.yaml
version left to the release pipeline; docs/CHANGELOG handled separately).

Segregated from develop as its own PR to main (chart change only; Chart.yaml
version left to the release pipeline; docs/CHANGELOG handled separately).
@guimoreirar
guimoreirar requested a review from a team as a code owner July 23, 2026 14:09
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Pix Switch Lerian adapters

Layer / File(s) Summary
Configuration and infrastructure
charts/plugin-br-pix-switch/values.yaml, values-template.yaml, values.schema.json, templates/bootstrap-postgres.yaml
Adds three disabled-by-default adapter configurations, multi-tenant settings, the pix-adapter-lerian database, ingress routes, and parameterized PostgreSQL checks.
Adapter API resources
charts/plugin-br-pix-switch/templates/adapter-lerian/*
Adds the adapter API Deployment, Service, Ingress, migration Job, ConfigMap, Secret, ServiceAccount, HPA, and PDB templates.
Consumer and systemplane resources
charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/*, charts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/*
Adds Kubernetes resources for the consumer and systemplane components, including telemetry environment variables, probes, autoscaling, and disruption policies.
Deployment documentation
charts/plugin-br-pix-switch/README.md
Documents thirteen binaries, four PostgreSQL databases, adapter defaults, and worker image naming.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant ProvidersIngress
  participant AdapterLerianService
  participant AdapterLerianDeployment
  Client->>ProvidersIngress: Request /lerian
  ProvidersIngress->>AdapterLerianService: Route request
  AdapterLerianService->>AdapterLerianDeployment: Forward HTTP request
  AdapterLerianDeployment->>AdapterLerianDeployment: Read ConfigMap and Secret environment
Loading

Possibly related PRs

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/plugin-br-pix-switch

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/configmap.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/deployment.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/hpa.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

  • 24 others

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/plugin-br-pix-switch/templates/adapter-lerian/pdb.yaml`:
- Around line 16-20: Update the PDB conditional around $values.pdb.minAvailable
and $values.pdb.maxUnavailable to detect configured numeric zero explicitly,
ensuring maxUnavailable: 0 is rendered instead of falling through without either
disruption field. Preserve the existing precedence and rendering behavior for
nonzero values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 38562b06-16a8-4d0d-b789-47433dc4b121

📥 Commits

Reviewing files that changed from the base of the PR and between 0ec7a15 and 39988cc.

📒 Files selected for processing (28)
  • charts/plugin-br-pix-switch/README.md
  • charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/configmap.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/deployment.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/hpa.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/pdb.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/secrets.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/service.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/serviceaccount.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/configmap.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/deployment.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/hpa.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/pdb.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/secrets.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/service.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/serviceaccount.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian/configmap.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian/deployment.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian/hpa.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian/ingress.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian/migrations-job.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian/pdb.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian/secrets.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian/service.yaml
  • charts/plugin-br-pix-switch/templates/adapter-lerian/serviceaccount.yaml
  • charts/plugin-br-pix-switch/templates/bootstrap-postgres.yaml
  • charts/plugin-br-pix-switch/values-template.yaml
  • charts/plugin-br-pix-switch/values.schema.json
  • charts/plugin-br-pix-switch/values.yaml

Comment on lines +16 to +20
{{- if $values.pdb.minAvailable }}
minAvailable: {{ $values.pdb.minAvailable }}
{{- else if $values.pdb.maxUnavailable }}
maxUnavailable: {{ $values.pdb.maxUnavailable }}
{{- end }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n -C4 '"(minAvailable|maxUnavailable)"|minimum' \
  charts/plugin-br-pix-switch/values.schema.json
sed -n '1,30p' charts/plugin-br-pix-switch/templates/adapter-lerian/pdb.yaml

Repository: LerianStudio/helm

Length of output: 155


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

git ls-files 'charts/plugin-br-pix-switch/**' | sed -n '1,120p'

Repository: LerianStudio/helm

Length of output: 7370


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

fd -a 'pdb.yaml|values.schema.json|values.yaml' charts/plugin-br-pix-switch

Repository: LerianStudio/helm

Length of output: 1327


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf 'FILES\n'
git ls-files 'charts/plugin-br-pix-switch/**' | sed -n '1,200p'

printf '\nPDB TEMPLATE\n'
sed -n '1,80p' charts/plugin-br-pix-switch/templates/adapter-lerian/pdb.yaml

printf '\nVALUES SCHEMA MATCHES\n'
rg -n -C3 '"(minAvailable|maxUnavailable)"|minimum' charts/plugin-br-pix-switch/values.schema.json || true

printf '\nVALUES FILE MATCHES\n'
rg -n -C3 'minAvailable|maxUnavailable|podDisruptionBudget|pdb' charts/plugin-br-pix-switch/values.yaml || true

Repository: LerianStudio/helm

Length of output: 12638


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

for f in \
  charts/plugin-br-pix-switch/templates/adapter-lerian/pdb.yaml \
  charts/plugin-br-pix-switch/values.yaml \
  charts/plugin-br-pix-switch/values.schema.json
do
  printf '\n== %s ==\n' "$f"
  if [ -f "$f" ]; then
    wc -l "$f"
    sed -n '1,120p' "$f"
  else
    echo 'missing'
  fi
done

Repository: LerianStudio/helm

Length of output: 9121


Preserve maxUnavailable: 0.

Helm treats numeric zero as false, so this branch skips both disruption fields when maxUnavailable is set to 0 (and minAvailable stays 0). Check for zero explicitly so the PDB remains valid.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/plugin-br-pix-switch/templates/adapter-lerian/pdb.yaml` around lines
16 - 20, Update the PDB conditional around $values.pdb.minAvailable and
$values.pdb.maxUnavailable to detect configured numeric zero explicitly,
ensuring maxUnavailable: 0 is rendered instead of falling through without either
disruption field. Preserve the existing precedence and rendering behavior for
nonzero values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant