feat(plugin-br-pix-switch): add adapter-lerian components - #1720
feat(plugin-br-pix-switch): add adapter-lerian components#1720guimoreirar wants to merge 1 commit into
Conversation
Segregated from develop as its own PR to main (chart change only; Chart.yaml version left to the release pipeline; docs/CHANGELOG handled separately).
📝 WalkthroughWalkthroughChangesPix Switch Lerian adapters
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
Possibly related PRs
✨ Finishing Touches✨ Simplify code
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.yamlTraceback (most recent call last): charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/deployment.yamlTraceback (most recent call last): charts/plugin-br-pix-switch/templates/adapter-lerian-consumer/hpa.yamlTraceback (most recent call last):
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (28)
charts/plugin-br-pix-switch/README.mdcharts/plugin-br-pix-switch/templates/adapter-lerian-consumer/configmap.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-consumer/deployment.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-consumer/hpa.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-consumer/pdb.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-consumer/secrets.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-consumer/service.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-consumer/serviceaccount.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/configmap.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/deployment.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/hpa.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/pdb.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/secrets.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/service.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian-systemplane/serviceaccount.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian/configmap.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian/deployment.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian/hpa.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian/ingress.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian/migrations-job.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian/pdb.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian/secrets.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian/service.yamlcharts/plugin-br-pix-switch/templates/adapter-lerian/serviceaccount.yamlcharts/plugin-br-pix-switch/templates/bootstrap-postgres.yamlcharts/plugin-br-pix-switch/values-template.yamlcharts/plugin-br-pix-switch/values.schema.jsoncharts/plugin-br-pix-switch/values.yaml
| {{- if $values.pdb.minAvailable }} | ||
| minAvailable: {{ $values.pdb.minAvailable }} | ||
| {{- else if $values.pdb.maxUnavailable }} | ||
| maxUnavailable: {{ $values.pdb.maxUnavailable }} | ||
| {{- end }} |
There was a problem hiding this comment.
🎯 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.yamlRepository: 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-switchRepository: 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 || trueRepository: 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
doneRepository: 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.
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).