-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat(plugin-br-pix-switch): add new helm chart #1154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
8977d4b
86b7f17
85bd001
01af30e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Changelog | ||
|
|
||
| ## [1.0.0] - 2026-03-27 | ||
|
|
||
| ### Added | ||
|
|
||
| - Initial chart release for plugin-br-pix-switch | ||
| - Single Go service deployment (HTTP port 4000, gRPC port 7001) | ||
| - PostgreSQL dependency (Bitnami subchart v16.3) | ||
| - Valkey dependency (Bitnami subchart v2.4.6) | ||
| - HPA, PDB, Ingress support | ||
| - OpenTelemetry integration | ||
| - Readiness and liveness probes |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| apiVersion: v2 | ||
| name: plugin-br-pix-switch-helm | ||
| description: A Helm chart for Kubernetes | ||
| type: application | ||
|
|
||
| home: https://github.com/LerianStudio/helm | ||
|
|
||
| # A list of maintainers who are responsible for the chart | ||
| maintainers: | ||
| - name: "Lerian Studio" | ||
| email: "support@lerian.studio" | ||
|
|
||
| # This is the chart version. This version number should be incremented each time you make changes | ||
| # to the chart and its templates, including the app version. | ||
|
|
||
| version: 1.0.0 | ||
|
|
||
| # This is the version number of the application being deployed. | ||
| appVersion: "1.0.0-beta.1" | ||
|
|
||
| # A list of keywords about the chart. This helps others discover the chart. | ||
| keywords: | ||
| - midaz | ||
| - lerian | ||
| - ledger | ||
| - plugins | ||
| - pix | ||
| - switch | ||
|
|
||
| # The URL to an icon file for this chart. Or the icon data. | ||
| icon: https://avatars.githubusercontent.com/u/148895005?s=200&v=4 | ||
|
|
||
| # This Helm chart includes multiple dependencies required for the application. | ||
| # To understand the purpose and configuration of each dependency, visit: | ||
| # https://docs.lerian.studio/docs/midaz-components | ||
| dependencies: | ||
| - name: postgresql | ||
| version: "16.3" | ||
| repository: "https://charts.bitnami.com/bitnami" | ||
| condition: postgresql.enabled | ||
| - name: valkey | ||
| version: "2.4.6" | ||
| repository: "oci://registry-1.docker.io/bitnamicharts" | ||
| condition: valkey.enabled | ||
|
bedatty marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| # Plugin BR Pix Switch Helm Chart | ||
|
|
||
| Helm chart for deploying the Plugin BR Pix Switch service on Kubernetes. | ||
|
|
||
| ## Overview | ||
|
|
||
| This chart deploys a single Go microservice for PIX switching operations, along with its dependencies: | ||
|
|
||
| - **Plugin BR Pix Switch** - Main API service (HTTP port 4000, gRPC port 7001) | ||
| - **PostgreSQL** - Primary database (Bitnami subchart) | ||
| - **Valkey** - Redis-compatible cache (Bitnami subchart) | ||
| - **OpenTelemetry Collector** - Observability (Lerian subchart) | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Kubernetes 1.19+ | ||
| - Helm 3.x | ||
|
Comment on lines
+16
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify API versions used by this chart's templates to confirm minimum Kubernetes version.
rg -n '^\s*apiVersion:\s*' charts/plugin-br-pix-switch/templates -g '*.yaml'
rg -n '^\s*kind:\s*(HorizontalPodAutoscaler|PodDisruptionBudget|Ingress)\s*$' charts/plugin-br-pix-switch/templates -g '*.yaml' -C2Repository: LerianStudio/helm Length of output: 2533 Update the Kubernetes minimum version in the prerequisite from The chart uses 🤖 Prompt for AI Agents |
||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| # Add dependencies | ||
| helm dependency build | ||
|
|
||
| # Install the chart | ||
| helm install plugin-br-pix-switch . -n midaz-plugins --create-namespace | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### Key Values | ||
|
|
||
| | Parameter | Description | Default | | ||
| |-----------|-------------|---------| | ||
| | `pixSwitch.image.repository` | Container image repository | `ghcr.io/lerianstudio/plugin-br-pix-switch` | | ||
| | `pixSwitch.image.tag` | Container image tag | `1.0.0-beta.1` | | ||
| | `pixSwitch.service.port` | HTTP service port | `4000` | | ||
| | `pixSwitch.service.grpcPort` | gRPC service port | `7001` | | ||
| | `pixSwitch.replicaCount` | Number of replicas | `1` | | ||
| | `pixSwitch.autoscaling.enabled` | Enable HPA | `true` | | ||
| | `pixSwitch.ingress.enabled` | Enable ingress | `false` | | ||
| | `postgresql.enabled` | Enable PostgreSQL subchart | `true` | | ||
| | `valkey.enabled` | Enable Valkey subchart | `true` | | ||
|
|
||
| ### Health Endpoints | ||
|
|
||
| The service exposes the following health endpoints: | ||
|
|
||
| - `/health` - General health check | ||
| - `/ready` - Readiness probe (used by Kubernetes) | ||
| - `/live` - Liveness probe (used by Kubernetes) | ||
|
|
||
| ### Using External Database | ||
|
|
||
| To use an external PostgreSQL database instead of the bundled subchart: | ||
|
|
||
| ```yaml | ||
| postgresql: | ||
| enabled: false | ||
|
|
||
| pixSwitch: | ||
| configmap: | ||
| DB_HOST: "your-external-db-host" | ||
| DB_USER: "your-db-user" | ||
| DB_NAME: "your-db-name" | ||
| DB_PORT: "5432" | ||
| secrets: | ||
| DB_PASSWORD: "your-db-password" | ||
| ``` | ||
|
|
||
| ### Using External Cache | ||
|
|
||
| To use an external Redis/Valkey instance: | ||
|
|
||
| ```yaml | ||
| valkey: | ||
| enabled: false | ||
|
|
||
| pixSwitch: | ||
| configmap: | ||
| VALKEY_HOST: "your-external-cache-host" | ||
| VALKEY_PORT: "6379" | ||
| secrets: | ||
| VALKEY_PASSWORD: "your-cache-password" | ||
| ``` | ||
|
|
||
| ## Production Notes | ||
|
|
||
| - The bundled PostgreSQL and Valkey subcharts are intended for **development only** | ||
| - For production, use managed database and cache services | ||
| - Configure `pixSwitch.useExistingSecrets: true` to use pre-existing Kubernetes secrets | ||
| - Enable ingress and TLS for external access | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,107 @@ | ||||||||||
| ============================================================ | ||||||||||
| Plugin BR Pix Switch - Helm Chart Deployment Summary | ||||||||||
| ============================================================ | ||||||||||
|
|
||||||||||
| Release Name: {{ .Release.Name }} | ||||||||||
| Namespace: {{ .Release.Namespace }} | ||||||||||
| Chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||||||||||
| App Version: {{ .Chart.AppVersion }} | ||||||||||
|
|
||||||||||
| ------------------------------------------------------------ | ||||||||||
| Main API Service (pixSwitch) | ||||||||||
| ------------------------------------------------------------ | ||||||||||
| Service: {{ include "plugin-br-pix-switch.fullname" . }} | ||||||||||
| HTTP Port: {{ .Values.pixSwitch.service.port }} | ||||||||||
| gRPC Port: {{ .Values.pixSwitch.service.grpcPort }} | ||||||||||
| Type: {{ .Values.pixSwitch.service.type }} | ||||||||||
|
|
||||||||||
| In-cluster access (HTTP): | ||||||||||
| curl http://{{ include "plugin-br-pix-switch.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.pixSwitch.service.port }}/health | ||||||||||
|
Comment on lines
+18
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Health endpoint path may be incorrect. The NOTES show ✏️ Proposed fix In-cluster access (HTTP):
- curl http://{{ include "plugin-br-pix-switch.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.pixSwitch.service.port }}/health
+ curl http://{{ include "plugin-br-pix-switch.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.pixSwitch.service.port }}/ready📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| In-cluster access (gRPC): | ||||||||||
| {{ include "plugin-br-pix-switch.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.pixSwitch.service.grpcPort }} | ||||||||||
|
|
||||||||||
| {{- if .Values.pixSwitch.ingress.enabled }} | ||||||||||
|
|
||||||||||
| Ingress: Enabled | ||||||||||
| {{- range .Values.pixSwitch.ingress.hosts }} | ||||||||||
| Host: {{ .host }} | ||||||||||
| {{- end }} | ||||||||||
| {{- else }} | ||||||||||
| Ingress: Disabled | ||||||||||
| {{- end }} | ||||||||||
|
|
||||||||||
| ------------------------------------------------------------ | ||||||||||
| Autoscaling & Availability | ||||||||||
| ------------------------------------------------------------ | ||||||||||
| {{- if .Values.pixSwitch.autoscaling.enabled }} | ||||||||||
| HPA: Enabled | ||||||||||
| Min Replicas: {{ .Values.pixSwitch.autoscaling.minReplicas }} | ||||||||||
| Max Replicas: {{ .Values.pixSwitch.autoscaling.maxReplicas }} | ||||||||||
| CPU Target: {{ .Values.pixSwitch.autoscaling.targetCPUUtilizationPercentage | default "N/A" }}% | ||||||||||
| Memory Target: {{ .Values.pixSwitch.autoscaling.targetMemoryUtilizationPercentage | default "N/A" }}% | ||||||||||
| {{- else }} | ||||||||||
| HPA: Disabled | ||||||||||
| Replicas: {{ .Values.pixSwitch.replicaCount }} | ||||||||||
| {{- end }} | ||||||||||
| {{- if .Values.pixSwitch.pdb.enabled }} | ||||||||||
| PDB: Enabled (maxUnavailable: {{ .Values.pixSwitch.pdb.maxUnavailable }}) | ||||||||||
| {{- else }} | ||||||||||
| PDB: Disabled | ||||||||||
| {{- end }} | ||||||||||
|
|
||||||||||
| ------------------------------------------------------------ | ||||||||||
| Secrets & Configuration | ||||||||||
| ------------------------------------------------------------ | ||||||||||
| ConfigMap: {{ include "plugin-br-pix-switch.fullname" . }} | ||||||||||
| {{- if .Values.pixSwitch.useExistingSecrets }} | ||||||||||
| Secret: {{ .Values.pixSwitch.existingSecretName }} (existing) | ||||||||||
| {{- else }} | ||||||||||
| Secret: {{ include "plugin-br-pix-switch.fullname" . }} | ||||||||||
| {{- end }} | ||||||||||
|
|
||||||||||
| ------------------------------------------------------------ | ||||||||||
| PostgreSQL | ||||||||||
| ------------------------------------------------------------ | ||||||||||
| {{- if .Values.postgresql.enabled }} | ||||||||||
| Status: Enabled (Bitnami subchart) | ||||||||||
| Database: {{ .Values.postgresql.auth.database }} | ||||||||||
| Username: {{ .Values.postgresql.auth.username }} | ||||||||||
| In-cluster: {{ .Release.Name }}-postgresql.{{ .Release.Namespace }}.svc.cluster.local:5432 | ||||||||||
|
|
||||||||||
| WARNING: Bitnami PostgreSQL is intended for development only. | ||||||||||
| For production, use an external managed database and set postgresql.enabled=false. | ||||||||||
| {{- else }} | ||||||||||
| Status: Disabled (using external database) | ||||||||||
| {{- end }} | ||||||||||
|
|
||||||||||
| ------------------------------------------------------------ | ||||||||||
| Valkey (Redis-compatible) | ||||||||||
| ------------------------------------------------------------ | ||||||||||
| {{- if .Values.valkey.enabled }} | ||||||||||
| Status: Enabled (Bitnami subchart) | ||||||||||
| Architecture: {{ .Values.valkey.architecture }} | ||||||||||
| In-cluster: {{ .Release.Name }}-valkey-primary.{{ .Release.Namespace }}.svc.cluster.local:6379 | ||||||||||
|
|
||||||||||
| WARNING: Bitnami Valkey is intended for development only. | ||||||||||
| For production, use an external managed cache and set valkey.enabled=false. | ||||||||||
| {{- else }} | ||||||||||
| Status: Disabled (using external cache) | ||||||||||
| {{- end }} | ||||||||||
|
|
||||||||||
| ------------------------------------------------------------ | ||||||||||
| Useful Commands | ||||||||||
| ------------------------------------------------------------ | ||||||||||
| # Get all resources | ||||||||||
| kubectl get all -l app.kubernetes.io/instance={{ .Release.Name }} -n {{ .Release.Namespace }} | ||||||||||
|
|
||||||||||
| # Check pod status | ||||||||||
| kubectl get pods -l app.kubernetes.io/instance={{ .Release.Name }} -n {{ .Release.Namespace }} | ||||||||||
|
|
||||||||||
| # View logs | ||||||||||
| kubectl logs -l app.kubernetes.io/name={{ include "plugin-br-pix-switch.name" . }} -n {{ .Release.Namespace }} -f | ||||||||||
|
|
||||||||||
| # Describe service | ||||||||||
| kubectl describe svc {{ include "plugin-br-pix-switch.fullname" . }} -n {{ .Release.Namespace }} | ||||||||||
|
|
||||||||||
| ============================================================ | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| {{/* | ||
| Expand the name of the chart and plugin pix-switch. | ||
| */}} | ||
| {{- define "plugin-br-pix-switch.name" -}} | ||
| {{- default (default .Values.pixSwitch.name) | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
bedatty marked this conversation as resolved.
|
||
|
|
||
| {{/* | ||
| Create chart name and version as used by the chart label for plugin pix-switch. | ||
| */}} | ||
| {{- define "plugin-br-pix-switch.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create a default fully qualified app name pix-switch. | ||
| We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
| If release name contains chart name it will be used as a full name. | ||
| */}} | ||
| {{- define "plugin-br-pix-switch.fullname" -}} | ||
| {{- default .Values.pixSwitch.name | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
bedatty marked this conversation as resolved.
|
||
|
|
||
| {{/* | ||
| Create app version. | ||
| */}} | ||
| {{- define "plugin.version" -}} | ||
| {{- printf "%s" .Chart.AppVersion | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| plugin-br-pix-switch Selector labels | ||
| */}} | ||
| {{- define "plugin-br-pix-switch.selectorLabels" -}} | ||
| {{- if .name -}} | ||
| app.kubernetes.io/name: {{ include "plugin-br-pix-switch.name" .context }} | ||
| {{- end }} | ||
| app.kubernetes.io/instance: {{ .context.Release.Name }} | ||
| {{- end }} | ||
|
bedatty marked this conversation as resolved.
|
||
|
|
||
| {{/* | ||
| pix-switch Common labels | ||
| */}} | ||
| {{- define "plugin-br-pix-switch.labels" -}} | ||
| helm.sh/chart: {{ include "plugin-br-pix-switch.chart" .context }} | ||
| {{ include "plugin-br-pix-switch.selectorLabels" (dict "context" .context "name" .name) }} | ||
| app.kubernetes.io/version: {{ include "plugin.version" .context }} | ||
| app.kubernetes.io/managed-by: {{ .context.Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the plugin-br-pix-switch service account to use | ||
| */}} | ||
| {{- define "plugin-br-pix-switch.serviceAccountName" -}} | ||
| {{- if .Values.pixSwitch.serviceAccount.create }} | ||
| {{- default (include "plugin-br-pix-switch.fullname" .) .Values.pixSwitch.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.pixSwitch.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Expand the namespace of the release. | ||
| Allows overriding it for multi-namespace deployments in combined charts. | ||
| */}} | ||
| {{- define "global.namespace" -}} | ||
| {{- default .Release.Namespace .Values.pixSwitch.namespaceOverride | trunc 63 | trimSuffix "-" -}} | ||
| {{- end }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add matching labeler rule for
plugin-br-pix-switch.Line 41 updates PR title scope validation, but
.github/configs/labeler.yaml:25-31still lacks aplugin-br-pix-switchpath rule. This can cause PRs to pass title lint while missing expected auto-labeling forcharts/plugin-br-pix-switch/**.🤖 Prompt for AI Agents