Skip to content
Browse the site

Deep Dives

AI: Claude and Codex patterns

ConfigHub: Deploy and manage

Configs
Stacks
Apps
Plugins
Guides
Docs

Before and after

PostgreSQL, before and after

A Helm chart you can't read becomes objects you can.

Before and after

Before: the Helm chart
        {{- if .Values.primary.initContainers }}
        {{- include "common.tplvalues.render" ( dict "value" .Values.primary.initContainers "context" $ ) | nindent 8 }}
        {{- end }}
      {{- end }}
      containers:
        - name: postgresql
          image: {{ include "postgresql.v1.image" . }}
          imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
          {{- if .Values.primary.containerSecurityContext.enabled }}
          securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.primary.containerSecurityContext "context" $) | nindent 12 }}
          {{- end }}
          {{- if .Values.diagnosticMode.enabled }}
          command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
          {{- else if .Values.primary.command }}
          command: {{- include "common.tplvalues.render" (dict "value" .Values.primary.command "context" $) | nindent 12 }}
          {{- end }}

16 lines of templates/primary/statefulset.yaml, around its image line. The chart has many files like this.

After: in ConfigHub
ConfigHub showing the PostgreSQL StatefulSet, at its image line

The same image line in ConfigHub, as a plain value. Taken in the helm-catalog organization on 2026-10-25, showing the PostgreSQL StatefulSet, at its image line.

ConfigHub holds this as 8 Units, one for each of the 7 objects the installer writes and one installer record.

In ConfigHub: one base, and a variant for each environment
ConfigHub showing the PostgreSQL base with its dev and prod variants, and the label and three replicas prod sets on its StatefulSet

Prod's panel lists what prod changes from the base, here its label and three replicas of its StatefulSet. Taken in the helm-catalog organization on 2026-10-26, showing the PostgreSQL base with its dev and prod variants, and the label and three replicas prod sets on its StatefulSet.

  • The template's image line becomes one plain value you can read, and so does every other field.
  • Your password stays put. The Helm chart makes a new one every time it runs, and here you create it once.
  • The image is pinned to exact bytes, so it can't change under you.

What Helm does that you never see, and what happens here instead

What Helm doesWhat happens here instead
Makes up a new administrator password every time it renders, so no two renders match.You create the Secret postgresql/postgresql-auth once, and the chart reads the password from it.

ConfigHub keeps configuration as plain objects, with a history of every change. Loading puts this chart's objects in a Space, a folder in your ConfigHub organization.

Load it into your ConfigHub

Sign in with the first line, then paste the rest. It fetches the PostgreSQL package, writes its files, and saves them as a Space called postgresql-example in your organization. The rest makes a dev and a prod variant of it, and prod runs three replicas of its StatefulSet. It touches no cluster.

$ cub auth login

$ cub installer setup --pull oci://europe-west1-docker.pkg.dev/nth-fort-499605-q5/helm-expt/bitnami-postgresql:18.7.0@sha256:cf2cfeae128c4ede5cfa9ac65bdf241b557d59a1badacdd107e044caadb0d353 --base existing-secret --work-dir ./postgresql-example --non-interactive --namespace postgresql && cub installer upload --work-dir ./postgresql-example --space postgresql-example && cub component create postgresql-example && cub space update --patch postgresql-example --component postgresql-example

$ cub variant create dev postgresql-example --change-desc "Clone the base as dev"

$ cub variant create prod postgresql-example --change-desc "Clone the base as prod"

$ cub function set --space postgresql-example-dev --change-desc "Label every object environment dev" set-label environment dev

$ cub function set --space postgresql-example-prod --change-desc "Label every object environment prod" set-label environment prod

$ cub function set --space postgresql-example-prod --unit statefulset-postgresql-postgresql --change-desc "Run three replicas in prod" set-replicas 3

You need a ConfigHub account and cub with its installer plugin and kustomize.

Try it on your laptop

No account needed. This fetches the PostgreSQL package and writes every object into a folder you can open. To check your own chart and values instead, see Is my configuration right?

$ cub installer setup --pull oci://europe-west1-docker.pkg.dev/nth-fort-499605-q5/helm-expt/bitnami-postgresql:18.7.0@sha256:cf2cfeae128c4ede5cfa9ac65bdf241b557d59a1badacdd107e044caadb0d353 --base existing-secret --work-dir ./postgresql-example --non-interactive --namespace postgresql && ls ./postgresql-example/out/manifests

You need cub with its installer plugin and kustomize.

Show me the details (for experienced users)