Skip to content

feat(plugin-access-manager): productize on lerian-common library (no regression) - #1745

Open
guimoreirar wants to merge 1 commit into
mainfrom
feat/plugin-access-manager-productization
Open

feat(plugin-access-manager): productize on lerian-common library (no regression)#1745
guimoreirar wants to merge 1 commit into
mainfrom
feat/plugin-access-manager-productization

Conversation

@guimoreirar

Copy link
Copy Markdown
Member

Productizes charts/plugin-access-manager/ on the lerian-common library — render byte-identical to main (empty diff, verified with the CI sample values).

What changed (helper-ized, render-clean)

  • hpa/pdb — auth, auth-backend, identity → lerian-common.hpa / .pdb
  • service — identity, auth-backend → lerian-common.service
  • ingress — auth, identity → lerian-common.ingress
  • OTEL block — auth, identity configmaps → lerian-common.otel.envFlat
  • Adds lerian-common-helm dependency (file://../lerian-common, >=1.0.0 <2.0.0).

Left native (bespoke — no render-equivalent helper)

Deployments (custom initContainers/probes/casdoor overrides), casdoor beego configmap, migration + init-user Jobs, provider secrets, dual-port auth service. access-manager is the auth provider, so the PLUGIN_AUTH consumer helper is intentionally NOT used; MULTI_TENANT_ENABLED toggle stays native (no lib multi-tenant block here); no SD_* block exists.

Verification

  • Old-pattern render diff vs main: empty (zero regression).
  • strict: 0 violations.

Dependency

Uses file:// to the in-repo lerian-common. The render-gate resolves file:// local deps via the materializeLocalDependencies validator step introduced in #1741 — so the render-gate check here will pass once #1741 merges (bringing that validator step to main). helm dependency build + helm template succeed at the real repo layout; strict is green.

Depends on #1742 (merged — helpers on main) and #1741 (validator step).

…regression)

Adopt lerian-common helpers where render-equivalent: hpa/pdb (auth,
auth-backend, identity), service (identity, auth-backend), ingress (auth,
identity), and the OTEL block (auth, identity configmaps) via otel.envFlat.
Bespoke surfaces stay native (deployments, casdoor configmap, migration/
init-user Jobs, provider secrets, dual-port auth service) — access-manager
is the auth provider, so no PLUGIN_AUTH consumer helper is used. Adds the
lerian-common-helm dependency (file://../lerian-common, >=1.0.0 <2.0.0).
Render byte-identical to main (empty diff).
@guimoreirar
guimoreirar requested a review from a team as a code owner July 24, 2026 20:47
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2362650c-e609-4b51-96f1-69c84471ed28

📥 Commits

Reviewing files that changed from the base of the PR and between 947fa64 and 9e04a7c.

⛔ Files ignored due to path filters (1)
  • charts/plugin-access-manager/Chart.lock is excluded by !**/*.lock
📒 Files selected for processing (13)
  • charts/plugin-access-manager/Chart.yaml
  • charts/plugin-access-manager/templates/auth-backend/hpa.yaml
  • charts/plugin-access-manager/templates/auth-backend/pdb.yaml
  • charts/plugin-access-manager/templates/auth-backend/service.yaml
  • charts/plugin-access-manager/templates/auth/configmap.yaml
  • charts/plugin-access-manager/templates/auth/hpa.yaml
  • charts/plugin-access-manager/templates/auth/ingress.yaml
  • charts/plugin-access-manager/templates/auth/pdb.yaml
  • charts/plugin-access-manager/templates/identity/configmap.yaml
  • charts/plugin-access-manager/templates/identity/hpa.yaml
  • charts/plugin-access-manager/templates/identity/ingress.yaml
  • charts/plugin-access-manager/templates/identity/pdb.yaml
  • charts/plugin-access-manager/templates/identity/service.yaml

📝 Walkthrough

Walkthrough

The chart adds the shared lerian-common-helm dependency and delegates Service, Ingress, HPA, PDB, and OpenTelemetry environment rendering to common Helm helpers for auth and identity components.

Changes

Shared helper migration

Layer / File(s) Summary
Common chart dependency
charts/plugin-access-manager/Chart.yaml
Adds the local lerian-common-helm dependency with version constraint >=1.0.0 <2.0.0.
Workload resource delegation
charts/plugin-access-manager/templates/auth-backend/*, charts/plugin-access-manager/templates/auth/{hpa,ingress,pdb,service}.yaml, charts/plugin-access-manager/templates/identity/{hpa,ingress,pdb,service}.yaml
Routes Service, Ingress, HPA, and PDB rendering through shared helpers while preserving component-specific values, names, labels, selectors, ports, and enablement conditions.
OpenTelemetry helper delegation
charts/plugin-access-manager/templates/auth/configmap.yaml, charts/plugin-access-manager/templates/identity/configmap.yaml
Uses lerian-common.otel.envFlat to render OpenTelemetry environment variables and defaults.

Possibly related PRs

  • LerianStudio/helm#1707: Introduces the shared common chart helpers used for workload resource rendering.
  • LerianStudio/helm#1726: Renames the common chart dependency to lerian-common-helm, matching this dependency declaration.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/plugin-access-manager-productization

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

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