Skip to content

feature(helm) - Simplify helm chart#304

Merged
peterj merged 6 commits intoagentregistry-dev:mainfrom
nikolasmatt:remove-managed-db-from-chart
Mar 9, 2026
Merged

feature(helm) - Simplify helm chart#304
peterj merged 6 commits intoagentregistry-dev:mainfrom
nikolasmatt:remove-managed-db-from-chart

Conversation

@nikolasmatt
Copy link
Copy Markdown
Collaborator

@nikolasmatt nikolasmatt commented Mar 6, 2026

Description

Significantly simplifies the charts/agentregistry Helm chart by removing features that were unused, or actively harmful in production. The chart now requires an external PostgreSQL instance and has a smaller surface area, cleaner values, and no cluster-state dependencies at render time.

The motivation behind removing the managed PostgreSQL instance is to remove the load from this project to field requests and support for managing the database instance.

Net change: −1,066 lines across 19 files (3 templates deleted, 2 test files deleted).

Removed:

  • Bundled PostgreSQL sidecar (database.bundled.*) and wait-for-postgres init container — external PostgreSQL with pgvector is now required
  • NetworkPolicy template (networkPolicy.*)
  • extraDeploy / extra-list.yaml
  • Diagnostic mode (diagnosticMode.*)
  • Host volume mounts (hostVolumes.*) — docker socket and host /tmp
  • Custom probe overrides (customLivenessProbe, customReadinessProbe, customStartupProbe)
  • Kubeconfig secret, volume mount, and KUBECONFIG ConfigMap entry
  • Extensibility escape hatches: extraEnvVarsCM, extraEnvVarsSecret, extraVolumes, extraVolumeMounts, initContainers, sidecars, config.extraConfig, service.extraPorts
  • secrets.autoGenerate / cluster lookup dependency in secrets.yaml

Simplified / restructured:

  • database.external.* flattened to database.*
  • RBAC: replaced clusterScoped/clusterAdminBinding/rules with watchedNamespaces — empty = cluster-wide ClusterRole (default), non-empty = Role per listed namespace; namespace read access always granted via ClusterRole
  • Secrets: replaced single top-level existingSecret with global.existingSecret, config.existingSecret, and database.existingSecret — chart creates a partial secret containing only the keys not covered by an existing secret
  • Moved existingSecret and jwtPrivateKey under config.*
  • Hardcoded RollingUpdate strategy; removed updateStrategy value

Validation:

  • config.jwtPrivateKey must be a non-empty valid hex string unless config.existingSecret or global.existingSecret is set
  • database.password must be set unless database.url, database.existingSecret, or global.existingSecret is set
  • database.host (or database.url) must be set — missing database host is now a hard error instead of a warning

Change Type

/kind breaking_change
/kind cleanup

Changelog

Helm chart: remove bundled PostgreSQL, NetworkPolicy, and unnecessary escape hatches; external PostgreSQL with pgvector is now required; database config flattened to `database.*`; RBAC simplified to `watchedNamespaces`

Additional Notes

Breaking changes migration guide:

Before After
database.bundled.* / database.external.* database.* (flat)
database.external.existingSecret database.existingSecret
existingSecret (top-level) global.existingSecret (drop-in equivalent)
secrets.jwtPrivateKey config.jwtPrivateKey
rbac.create rbac.enabled
rbac.clusterScoped: false rbac.watchedNamespaces: [<namespace>]
rbac.clusterAdminBinding: true Removed — configure least-privilege rules
kubeconfig.existingSecret / kubeconfig.content Removed
networkPolicy.* Removed
diagnosticMode.* Removed
hostVolumes.* Removed

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR simplifies the charts/agentregistry Helm chart by removing bundled/optional components (managed PostgreSQL, NetworkPolicy, kubeconfig secret, and various “escape hatches”) and restructuring values so deployments require an externally managed PostgreSQL instance.

Changes:

  • Remove bundled PostgreSQL resources and related tests/templates; require external DB configuration.
  • Simplify RBAC configuration to rbac.watchedNamespaces with default cluster-wide permissions.
  • Restructure secret handling and rename secret key usage to JWT_PRIVATE_KEY, adding validation for required credentials.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
charts/agentregistry/values.yaml Updates values schema (global/config/database secrets, flattened database config, simplified RBAC).
charts/agentregistry/tests/validation_test.yaml Updates validation tests for JWT/db password requirements.
charts/agentregistry/tests/secrets_test.yaml Updates secret rendering tests for new secret behavior and key names.
charts/agentregistry/tests/rbac_test.yaml Updates RBAC tests to cover watchedNamespaces behavior.
charts/agentregistry/tests/postgresql_test.yaml Deletes tests for bundled PostgreSQL (feature removed).
charts/agentregistry/tests/networkpolicy_test.yaml Deletes NetworkPolicy tests (feature removed).
charts/agentregistry/tests/deployment_test.yaml Updates deployment tests for env var rename, DB config flattening, and hardcoded strategy.
charts/agentregistry/tests/configmap_test.yaml Updates ConfigMap tests after removing kubeconfig/extraConfig features.
charts/agentregistry/templates/service.yaml Removes service.extraPorts rendering.
charts/agentregistry/templates/secrets.yaml Reworks secret creation rules and key names; supports partial secret creation.
charts/agentregistry/templates/rbac.yaml Replaces prior RBAC options with watchedNamespaces model.
charts/agentregistry/templates/postgresql.yaml Deletes bundled PostgreSQL resources (feature removed).
charts/agentregistry/templates/networkpolicy.yaml Deletes NetworkPolicy template (feature removed).
charts/agentregistry/templates/extra-list.yaml Deletes extraDeploy template (feature removed).
charts/agentregistry/templates/deployment.yaml Removes kubeconfig/init-container/diagnostic/extensibility hooks; hardcodes RollingUpdate; updates env vars.
charts/agentregistry/templates/configmap.yaml Removes KUBECONFIG and extra config injection.
charts/agentregistry/templates/_helpers.tpl Removes bundled-DB helpers and adds new validation logic / flattened DB URL builder.
charts/agentregistry/templates/NOTES.txt Updates database info output to match external-only DB configuration.
charts/agentregistry/README.md.gotmpl Updates documentation and examples for external DB, new secret structure, and watchedNamespaces RBAC.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

helm install my-agentregistry oci://ghcr.io/agentregistry-dev/helm/agentregistry
helm install my-agentregistry oci://ghcr.io/agentregistry-dev/helm/agentregistry \
--set config.jwtPrivateKey=$(openssl rand -hex 32) \
--set database.host=my-postgres.example.com \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

probably as separate pr, but I'd love to have an easy way (at least for development), to install a postgres and the registry with a single make target.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I am working on a followup PR that uses the chart for a local develpement setup and e2e test environment. As part of that i'll include the user instruction for installing postgres.

@peterj peterj enabled auto-merge March 9, 2026 22:08
@peterj peterj disabled auto-merge March 9, 2026 22:17
@peterj peterj enabled auto-merge March 9, 2026 22:39
auto-merge was automatically disabled March 9, 2026 22:45

Head branch was pushed to by a user without write access

@peterj peterj enabled auto-merge March 9, 2026 22:57
@peterj peterj added this pull request to the merge queue Mar 9, 2026
Merged via the queue into agentregistry-dev:main with commit 9509645 Mar 9, 2026
8 checks passed
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.

3 participants