> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Pix via Helm

> Deploy the direct-participant Pix plugin on Kubernetes with the plugin-br-pix-direct-jd-helm chart, including its required secrets and release-name constraint.

The Pix plugin processes Brazilian Pix instant payments as a direct participant. The chart name is `plugin-br-pix-direct-jd-helm`.

<Note>
  The Pix plugin requires an Enterprise license. Contact Lerian for access to the plugin images and the deployment credentials.
</Note>

## What the chart installs

***

The chart installs three components:

* **Pix**: the payment service, with a Deployment, a Service, a ConfigMap, a Secret, a HorizontalPodAutoscaler, a PodDisruptionBudget, and an optional Ingress.
* **QR Code**: a separate Deployment with the same resource set, for QR code generation.
* **Job**: a CronJob with its own ConfigMap, Secret, and Service.

The chart bundles a PostgreSQL subchart and enables it by default. Set `postgresql.enabled: false` to use an externally managed PostgreSQL.

## Prerequisites

***

* A running Midaz deployment.
* Connectivity to the Brazilian payment infrastructure through the direct-participant channel.
* Enterprise license and registry credentials.
* Helm 3.8 or later for OCI registry support.

## Install

***

Read the current chart version first, then install:

```bash theme={null}
helm show chart oci://registry-1.docker.io/lerianstudio/plugin-br-pix-direct-jd-helm
```

```bash theme={null}
helm install plugin-br-pix-direct-jd \
  oci://registry-1.docker.io/lerianstudio/plugin-br-pix-direct-jd-helm \
  --version <version> -n midaz-plugins --create-namespace -f my-values.yaml
```

<Warning>
  Install the release as `plugin-br-pix-direct-jd` in the `midaz-plugins` namespace, or set the database host yourself. With the bundled PostgreSQL, `DATABASE_HOST` defaults to a service name built from that release name and namespace. Under any other name, set `pix.configmap.DATABASE_HOST` and the job's `DATABASE_HOST` to the PostgreSQL service.
</Warning>

## Values you must set

***

Put every credential in `pix.secrets`, or point the release at your own Secret with `pix.useExistingSecret`. Set these keys:

| Key                                           | Purpose                                    |
| :-------------------------------------------- | :----------------------------------------- |
| `LICENSE_KEY`                                 | Enterprise license validation.             |
| `MIDAZ_CLIENT_ID` and `MIDAZ_CLIENT_SECRET`   | Machine-to-machine access to Midaz.        |
| `JD_CLIENT_ID` and `JD_SECRET`                | Access to the direct-participant channel.  |
| `JD_PIX_CLIENT_ID` and `JD_PIX_CLIENT_SECRET` | Access to the Pix service on that channel. |
| `SECRET_KEY_BASE`                             | Signs the service's own session data.      |

Leave `DATABASE_PASSWORD` and `POSTGRES_PASSWORD` empty while the bundled subchart is enabled. The subchart generates the password into its own Secret, and both the Deployment and the CronJob read it from there. Set them only for an external PostgreSQL that has no existing Secret of its own.

## Upgrade and uninstall

***

```bash theme={null}
helm upgrade plugin-br-pix-direct-jd \
  oci://registry-1.docker.io/lerianstudio/plugin-br-pix-direct-jd-helm \
  --version <new-version> -n midaz-plugins -f my-values.yaml
```

```bash theme={null}
helm uninstall plugin-br-pix-direct-jd -n midaz-plugins
```

## Resources

***

* [Pix documentation](/en/interfaces/pix/pix-overview)
* [Plugin Helm charts](/en/platform/deploy/plugins/plugins-helm-overview)
* [Helm chart repository](https://github.com/LerianStudio/helm)
