Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0578ef4
feat(midaz): productize chart on lerian-common library (full, no regr…
guimoreirar Jul 24, 2026
3cd3042
feat(midaz): wire service discovery via serviceDiscovery.env (clean c…
guimoreirar Jul 24, 2026
b2e8476
Merge remote-tracking branch 'origin/main' into HEAD
guimoreirar Jul 24, 2026
423888b
chore(midaz): sync Chart.lock to lerian-common 1.2.0
guimoreirar Jul 24, 2026
b23f68a
feat(midaz): grouped multiTenant + streaming sections (derivation model)
guimoreirar Jul 24, 2026
7edca7e
feat(midaz): expose env-wide global.{serviceDiscovery,streaming,multi…
guimoreirar Jul 24, 2026
8f0f252
fix(midaz): address CodeRabbit review on productized configmaps, ingr…
guimoreirar Jul 28, 2026
0c4594a
fix(midaz): keep lerian-common helper unchanged; SD tls-skip-verify d…
guimoreirar Jul 28, 2026
60ebefe
Merge remote-tracking branch 'origin/main' into feat/midaz-productiza…
guimoreirar Jul 28, 2026
b9dcfdb
chore(midaz): refresh Chart.lock for lerian-common 1.2.1
guimoreirar Jul 28, 2026
110c0d5
feat(midaz): bundle optional HashiCorp Vault subchart for CRM KMS
guimoreirar Jul 28, 2026
26cf5a2
fix(midaz): allowlist bundled dev-vault root token in chart-standard …
guimoreirar Jul 28, 2026
752cbb7
fix(midaz): honor legacy configmap.SD_ENABLED (backward-compat)
guimoreirar Jul 28, 2026
66ab70d
feat(midaz): sync ledger/crm configmap+secret to app .env parity
guimoreirar Jul 30, 2026
3b8c2ed
Revert "feat(midaz): sync ledger/crm configmap+secret to app .env par…
guimoreirar Jul 30, 2026
7be07bb
feat(midaz): productize remaining client-facing flat env blocks (ledg…
guimoreirar Jul 30, 2026
abdc750
Merge remote-tracking branch 'origin/main' into feat/midaz-productiza…
guimoreirar Jul 30, 2026
7a2112d
docs(midaz): add chart README
Jul 30, 2026
cb6cba1
docs(midaz): correct stale README defaults (ledger.enabled=true, imag…
guimoreirar Jul 30, 2026
41c8b36
fix(midaz): default vault off, honor legacy configmap MT block, pin l…
guimoreirar Jul 30, 2026
9dff84a
Merge remote-tracking branch 'origin/main' into feat/midaz-productiza…
guimoreirar Jul 30, 2026
1acccff
fix(midaz): pass configmap to SD/streaming helpers (honor legacy serv…
guimoreirar Jul 30, 2026
ca8ec97
fix(midaz): single-source env via global.environment; restore ledger …
guimoreirar Jul 31, 2026
d3b7f8a
fix(midaz): gate multi-tenant Secret on resolved MULTI_TENANT_ENABLED…
guimoreirar Jul 31, 2026
e00479a
Merge remote-tracking branch 'origin/main' into feat/midaz-productiza…
guimoreirar Jul 31, 2026
e7115c0
fix(midaz): bump lerian-common pin to 1.3.0
guimoreirar Jul 31, 2026
1a8b8c1
fix(midaz): restore ledger ENABLE_TELEMETRY default to true
guimoreirar Jul 31, 2026
a695904
fix(midaz): pass component dedicated datastores map to datastore.value
guimoreirar Jul 31, 2026
21da0ce
fix(midaz): consume global.observability for OTEL endpoint/env/enable
guimoreirar Jul 31, 2026
15a2f3b
docs(midaz): correct Vault default + lerian-common version notes
guimoreirar Jul 31, 2026
6daaf1d
feat(validate): render-assertion gate for productized chart contracts
guimoreirar Jul 31, 2026
6153960
Merge remote-tracking branch 'origin/main' into feat/midaz-productiza…
guimoreirar Jul 31, 2026
7281bd1
Merge remote-tracking branch 'origin/main' into feat/midaz-productiza…
guimoreirar Jul 31, 2026
3c22683
fix(midaz): re-pin lerian-common 1.3.1 + render-assertion contracts
guimoreirar Jul 31, 2026
e085738
fix(midaz): enforce SASL password + harden render-assertion gate
guimoreirar Jul 31, 2026
79e5559
fix(midaz): CRM deployment-mode + KMS approle, PDB/revisionHistory pr…
guimoreirar Jul 31, 2026
f815e27
Merge remote-tracking branch 'origin/main' into feat/midaz-productiza…
guimoreirar Jul 31, 2026
48d5af1
fix(midaz): re-pin lerian-common 1.3.2 + close-out render assertions
guimoreirar Jul 31, 2026
23b7285
fix(midaz): pass resolved SASL username to streaming.secret
guimoreirar Jul 31, 2026
612c54c
Merge remote-tracking branch 'origin/main' into feat/midaz-productiza…
guimoreirar Jul 31, 2026
2553cc1
fix(midaz): re-pin lerian-common 1.3.3 (SASL username fail-fast)
guimoreirar Jul 31, 2026
582e6f3
Merge remote-tracking branch 'origin/main' into feat/midaz-productiza…
guimoreirar Aug 2, 2026
536a438
fix(midaz): re-pin lerian-common 1.3.4 (full SASL contract) + assertions
guimoreirar Aug 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/scripts/validate-helm-charts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,16 @@ func buildRenderRows(root string, chartSelection map[string]bool, sampleValuesDi
return nil, err
}

// Local library dependencies referenced via `file://<relpath>` (e.g.
// lerian-common) live outside the copied chart, so `helm dependency
// build` cannot resolve them in the isolated temp workspace. Materialize
// each such sibling at the same relative location so the file:// path
// resolves exactly as it does in the source tree.
if err := materializeLocalDependencies(chartDir, tmpChart, deps); err != nil {
_ = os.RemoveAll(tmpRoot)
return nil, err
}

helmEnv, err := isolatedHelmEnv(tmpRoot)
if err != nil {
_ = os.RemoveAll(tmpRoot)
Expand Down Expand Up @@ -1517,6 +1527,30 @@ func writeRenderInventory(path string, rows []renderRow) error {
return os.WriteFile(path, []byte(builder.String()), 0o644)
}

// materializeLocalDependencies copies each `file://<relpath>` dependency source
// into the temp workspace at the same relative path the chart references, so an
// isolated `helm dependency build` resolves local library charts (e.g.
// lerian-common) exactly as it would in the repository tree. Missing sources are
// left to `helm dependency build` to report as a normal missing-dependency.
func materializeLocalDependencies(chartDir, tmpChart string, deps []chartDependency) error {
for _, dependency := range deps {
repository := strings.TrimSpace(dependency.Repository)
if !strings.HasPrefix(repository, "file://") {
continue
}
relPath := strings.TrimPrefix(repository, "file://")
srcDir := filepath.Clean(filepath.Join(chartDir, relPath))
if !dirExists(srcDir) {
continue
}
destDir := filepath.Clean(filepath.Join(tmpChart, relPath))
if err := copyDir(srcDir, destDir); err != nil {
return err
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
}
}
return nil
}

func copyDir(src, dst string) error {
return filepath.WalkDir(src, func(path string, d os.DirEntry, err error) error {
if err != nil {
Expand Down
7 changes: 5 additions & 2 deletions charts/midaz/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
dependencies:
- name: lerian-common-helm
repository: file://../lerian-common
version: 1.1.0
- name: valkey
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.4.7
Expand All @@ -11,5 +14,5 @@ dependencies:
- name: rabbitmq
repository: https://groundhog2k.github.io/helm-charts
version: 2.1.11
digest: sha256:2a2522d76f48d28c4bc86bd4c23226346e921eeeba11a217b89b5a71589a7f92
generated: "2026-06-19T15:26:51.872268447-03:00"
digest: sha256:4e786f74c324f50427eaa426955a68be4de7d51bda962031aa2be9e8abdc383f
generated: "2026-07-24T17:38:37.102685-03:00"
3 changes: 3 additions & 0 deletions charts/midaz/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ icon: https://avatars.githubusercontent.com/u/148895005?s=200&v=4
# To understand the purpose and configuration of each dependency, visit:
# https://docs.lerian.studio/docs/midaz-components
dependencies:
- name: lerian-common-helm
version: ">=1.0.0 <2.0.0"
repository: "file://../lerian-common"
- name: valkey
version: "2.4.7"
repository: "oci://registry-1.docker.io/bitnamicharts"
Expand Down
57 changes: 21 additions & 36 deletions charts/midaz/templates/crm/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ metadata:
{{- include "midaz-crm.labels" (dict "context" . "name" .Values.crm.name ) | nindent 4 }}
data:
# -- Default Environment variables for CRM
ALLOW_INSECURE_TLS: {{ .Values.crm.configmap.ALLOW_INSECURE_TLS | default "true" | quote }}
ENV_NAME: {{ .Values.crm.configmap.ENV_NAME | default "development" | quote }}
ALLOW_INSECURE_TLS: {{ include "lerian-common.cfgValue" (dict "configmap" .Values.crm.configmap "nativeKey" "ALLOW_INSECURE_TLS" "params" .Values.crm "field" "allowInsecureTls" "default" "true") | quote }}
ENV_NAME: {{ include "lerian-common.cfgValue" (dict "configmap" .Values.crm.configmap "nativeKey" "ENV_NAME" "params" .Values.crm "field" "env" "default" "development") | quote }}

# APP
APPLICATION_NAME: {{ .Values.crm.configmap.APPLICATION_NAME | default "crm" | quote }}
Expand All @@ -17,13 +17,13 @@ data:
VERSION: {{ .Values.crm.image.tag | default .Chart.AppVersion | quote }}

# Mongo DB
MONGO_URI: {{ .Values.crm.configmap.MONGO_URI | default "mongodb" | quote }}
MONGO_HOST: {{ .Values.crm.configmap.MONGO_HOST | default "midaz-mongodb" | quote }}
MONGO_PORT: {{ .Values.crm.configmap.MONGO_PORT | default "27017" | quote }}
MONGO_NAME: {{ .Values.crm.configmap.MONGO_NAME | default "crm" | quote }}
MONGO_USER: {{ .Values.crm.configmap.MONGO_USER | default "midaz" | quote }}
MONGO_MAX_POOL_SIZE: {{ .Values.crm.configmap.MONGO_MAX_POOL_SIZE | default "1000" | quote }}
MONGO_PARAMETERS: {{ .Values.crm.configmap.MONGO_PARAMETERS | default "" | quote }}
MONGO_URI: {{ include "lerian-common.cfgValue" (dict "configmap" .Values.crm.configmap "nativeKey" "MONGO_URI" "params" .Values.crm.mongo "field" "uri" "default" "mongodb") | quote }}
MONGO_HOST: {{ include "lerian-common.datastore.value" (dict "context" $ "configmap" .Values.crm.configmap "type" "mongo" "field" "host" "nativeKey" "MONGO_HOST" "default" "midaz-mongodb") | quote }}
MONGO_PORT: {{ include "lerian-common.datastore.value" (dict "context" $ "configmap" .Values.crm.configmap "type" "mongo" "field" "port" "nativeKey" "MONGO_PORT" "default" "27017") | quote }}
MONGO_NAME: {{ include "lerian-common.cfgValue" (dict "configmap" .Values.crm.configmap "nativeKey" "MONGO_NAME" "params" .Values.crm.mongo "field" "name" "default" "crm") | quote }}
MONGO_USER: {{ include "lerian-common.datastore.value" (dict "context" $ "configmap" .Values.crm.configmap "type" "mongo" "field" "user" "nativeKey" "MONGO_USER" "default" "midaz") | quote }}
MONGO_MAX_POOL_SIZE: {{ include "lerian-common.cfgValue" (dict "configmap" .Values.crm.configmap "nativeKey" "MONGO_MAX_POOL_SIZE" "params" .Values.crm.mongo "field" "maxPoolSize" "default" "1000") | quote }}
MONGO_PARAMETERS: {{ include "lerian-common.datastore.value" (dict "context" $ "configmap" .Values.crm.configmap "type" "mongo" "field" "params" "nativeKey" "MONGO_PARAMETERS" "default" "") | quote }}
MONGO_TLS_CA_CERT: {{ .Values.crm.configmap.MONGO_TLS_CA_CERT | default "" | quote }}

# SWAGGER
Expand All @@ -37,44 +37,29 @@ data:
SWAGGER_RIGHT_DELIMITER: {{ .Values.crm.configmap.SWAGGER_RIGHT_DELIMITER | default "}}" | quote }}

# LOG LEVEL
LOG_LEVEL: {{ .Values.crm.configmap.LOG_LEVEL | default "debug" | quote }}
LOG_LEVEL: {{ include "lerian-common.cfgValue" (dict "configmap" .Values.crm.configmap "nativeKey" "LOG_LEVEL" "params" .Values.crm "field" "logLevel" "default" "debug") | quote }}

# OPEN TELEMETRY
OTEL_RESOURCE_SERVICE_NAME: {{ .Values.crm.configmap.OTEL_RESOURCE_SERVICE_NAME | default "midaz-crm" | quote }}
OTEL_LIBRARY_NAME: {{ .Values.crm.configmap.OTEL_LIBRARY_NAME | default "github.com/LerianStudio/plugin-crm" | quote }}
OTEL_RESOURCE_SERVICE_VERSION: {{ .Values.crm.image.tag | default .Chart.AppVersion | quote }}
OTEL_RESOURCE_DEPLOYMENT_ENVIRONMENT: {{ .Values.crm.configmap.ENV_NAME | default "development" | quote }}
OTEL_EXPORTER_OTLP_ENDPOINT_PORT: {{ .Values.crm.configmap.OTEL_EXPORTER_OTLP_ENDPOINT_PORT | default "4317" | quote }}
OTEL_EXPORTER_OTLP_ENDPOINT: {{ .Values.crm.configmap.OTEL_EXPORTER_OTLP_ENDPOINT | default "midaz-grafana:4317" | quote }}
{{- include "lerian-common.otel.envFlat" (dict
"configmap" .Values.crm.configmap
"defaults" (dict
"OTEL_RESOURCE_SERVICE_NAME" "midaz-crm"
"OTEL_LIBRARY_NAME" "github.com/LerianStudio/plugin-crm"
"OTEL_RESOURCE_SERVICE_VERSION" (.Values.crm.image.tag | default .Chart.AppVersion)
"OTEL_RESOURCE_DEPLOYMENT_ENVIRONMENT" (.Values.crm.configmap.ENV_NAME | default "development"))) | nindent 2 }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
ENABLE_TELEMETRY: {{ .Values.crm.configmap.ENABLE_TELEMETRY | default "true" | quote }}

# AUTH
PLUGIN_AUTH_ADDRESS: {{ .Values.crm.configmap.PLUGIN_AUTH_ADDRESS | default "plugin-auth" | quote }}
PLUGIN_AUTH_ENABLED: {{ .Values.crm.configmap.PLUGIN_AUTH_ENABLED | default "false" | quote }}
PLUGIN_AUTH_ADDRESS: {{ include "lerian-common.globalValue" (dict "context" $ "configmap" .Values.crm.configmap "block" "auth" "field" "host" "nativeKey" "PLUGIN_AUTH_ADDRESS" "default" "http://plugin-access-manager-auth:4000") | quote }}
PLUGIN_AUTH_ENABLED: {{ include "lerian-common.globalValue" (dict "context" $ "configmap" .Values.crm.configmap "block" "auth" "field" "enabled" "nativeKey" "PLUGIN_AUTH_ENABLED" "default" "false") | quote }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

# MULTI-TENANT
MULTI_TENANT_ENABLED: {{ .Values.crm.configmap.MULTI_TENANT_ENABLED | default "false" | quote }}
{{- include "lerian-common.multiTenant.envFlat" (dict "configmap" .Values.crm.configmap "keys" (list)) | nindent 2 }}

KMS_VAULT_ADDR: {{ .Values.crm.configmap.KMS_VAULT_ADDR | default "http://midaz-hc-vault:8200" | quote }}
KMS_VAULT_AUTH_METHOD: {{ .Values.crm.configmap.KMS_VAULT_AUTH_METHOD | default "token" | quote }}
KMS_VENDOR: {{ .Values.crm.configmap.KMS_VENDOR | default "hashicorp-vault" | quote }}
SD_ADDRESS: {{ .Values.crm.configmap.SD_ADDRESS | default "localhost:8500" | quote }}
SD_ALLOW_STALE: {{ .Values.crm.configmap.SD_ALLOW_STALE | default "" | quote }}
SD_DIAL_TIMEOUT: {{ .Values.crm.configmap.SD_DIAL_TIMEOUT | default "" | quote }}
SD_ENABLED: {{ .Values.crm.configmap.SD_ENABLED | default "false" | quote }}
SD_EXTERNAL_ADDRESS: {{ .Values.crm.configmap.SD_EXTERNAL_ADDRESS | default "" | quote }}
SD_EXTERNAL_PORT: {{ .Values.crm.configmap.SD_EXTERNAL_PORT | default "" | quote }}
SD_INTERNAL_ADDRESS: {{ .Values.crm.configmap.SD_INTERNAL_ADDRESS | default "" | quote }}
SD_INTERNAL_PORT: {{ .Values.crm.configmap.SD_INTERNAL_PORT | default "" | quote }}
SD_INTERNAL_SCHEME: {{ .Values.crm.configmap.SD_INTERNAL_SCHEME | default "" | quote }}
SD_PREFER_VIEW: {{ .Values.crm.configmap.SD_PREFER_VIEW | default "" | quote }}
SD_RESPONSE_HEADER_TIMEOUT: {{ .Values.crm.configmap.SD_RESPONSE_HEADER_TIMEOUT | default "" | quote }}
SD_SEED_TIMEOUT: {{ .Values.crm.configmap.SD_SEED_TIMEOUT | default "" | quote }}
SD_TLS: {{ .Values.crm.configmap.SD_TLS | default "false" | quote }}
SD_TLS_HANDSHAKE_TIMEOUT: {{ .Values.crm.configmap.SD_TLS_HANDSHAKE_TIMEOUT | default "" | quote }}
SD_TLS_SKIP_VERIFY: {{ .Values.crm.configmap.SD_TLS_SKIP_VERIFY | default "false" | quote }}
SD_WATCH_WAIT_TIME: {{ .Values.crm.configmap.SD_WATCH_WAIT_TIME | default "" | quote }}
SD_WORKLOAD: {{ .Values.crm.configmap.SD_WORKLOAD | default "" | quote }}
{{- include "lerian-common.serviceDiscovery.envFlat" (dict "configmap" .Values.crm.configmap) | nindent 2 }}
STREAMING_ENABLED: {{ .Values.crm.configmap.STREAMING_ENABLED | default "false" | quote }}
# Extra Env Vars
{{- with .Values.crm.extraEnvVars }}
Expand Down
71 changes: 11 additions & 60 deletions charts/midaz/templates/crm/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,61 +1,12 @@
{{- if and .Values.crm.enabled .Values.crm.ingress.enabled -}}
{{- $fullName := include "midaz-crm.fullname" . -}}
{{- $svcPort := .Values.crm.service.port -}}
{{- if and .Values.crm.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.crm.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.crm.ingress.annotations "kubernetes.io/ingress.class" .Values.crm.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "midaz-crm.labels" (dict "context" . "name" .Values.crm.name ) | nindent 4 }}
{{- with .Values.crm.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.crm.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.crm.ingress.className }}
{{- end }}
{{- if .Values.crm.ingress.tls }}
tls:
{{- range .Values.crm.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.crm.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- $gIng := (.Values.global | default dict).ingress | default dict -}}
{{- if and .Values.crm.enabled (or .Values.crm.ingress.enabled $gIng.enabled) -}}
{{- include "lerian-common.ingress" (dict
"context" .
"ingress" .Values.crm.ingress
"global" $gIng
"subdomain" "crm"
"name" (include "midaz-crm.fullname" .)
"labels" (include "midaz-crm.labels" (dict "context" . "name" .Values.crm.name))
"svcPort" .Values.crm.service.port
) }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
{{- end }}
Loading
Loading