diff --git a/CLAUDE.md b/CLAUDE.md index cf872b22..e5c1c454 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -127,6 +127,22 @@ Dependency chart archives in `charts/*/charts/` are gitignored. - **Patch bump**: bug fixes, documentation - Update `CHANGELOG.md` for every version bump (used in GitHub release notes) +## Pre-commit Checklist + +After modifying any chart, regenerate derived files before committing: + +1. **README.md** — run `helm-docs` whenever `values.yaml`, `Chart.yaml`, or `README.md.gotmpl` change: + ```bash + helm-docs --chart-search-root charts/document-engine + helm-docs --chart-search-root charts/ai-assistant + ``` +2. **values.schema.json** — run `helm schema` whenever `values.yaml` schema annotations change: + ```bash + cd charts/document-engine && helm schema -input values.yaml -draft 2020 -indent 2 -output values.schema.json + ``` + +CI will fail if generated files are out of sync with their sources. + ## Template Patterns ### Shared Helpers (`_helpers.tpl`) @@ -143,3 +159,9 @@ Standard helpers for names, labels, selectors plus: ### Schema Defaults All default values come from `values.schema.json`. Templates reference `.Values.*` directly without `| default` fallbacks. + +### Template Pitfalls + +- **YAML document separators (`---`)**: Never use `{{-` (left-trim) on the line immediately after `---`. The trim eats the newline and produces the invalid token `---apiVersion:`. Use `{{` (no dash) or leave a YAML comment between them. +- **Go template comments in Helm**: Avoid `{{- /* ... */ }}` (trimming comment) in templates. Helm's linter can misparse the `{{-` trim prefix followed by `/*` as a broken action. Use YAML comments (`# ...`) for inline notes instead. +- **`{{` in YAML comments**: Go's template engine processes all `{{` delimiters *before* YAML parsing, so even `# some comment {{-` will be parsed as a template action. Never use `{{` in YAML comments inside Helm templates. diff --git a/charts/document-engine/CHANGELOG.md b/charts/document-engine/CHANGELOG.md index b451b1e1..ae47bad9 100644 --- a/charts/document-engine/CHANGELOG.md +++ b/charts/document-engine/CHANGELOG.md @@ -1,25 +1,27 @@ # Changelog - [Changelog](#changelog) + - [8.1.1 (2026-03-12)](#811-2026-03-12) + - [Fixed](#fixed) - [8.1.0 (2026-02-28)](#810-2026-02-28) - [Added](#added) - [Changed](#changed) - [8.0.7 (2026-02-27)](#807-2026-02-27) - - [Fixed](#fixed) + - [Fixed](#fixed-1) - [8.0.6 (2026-02-26)](#806-2026-02-26) - [Changed](#changed-1) - [8.0.5 (2026-02-26)](#805-2026-02-26) - - [Fixed](#fixed-1) + - [Fixed](#fixed-2) - [Changed](#changed-2) - [8.0.4 (2026-02-26)](#804-2026-02-26) - - [Fixed](#fixed-2) - - [8.0.3 (2026-02-26)](#803-2026-02-26) - [Fixed](#fixed-3) + - [8.0.3 (2026-02-26)](#803-2026-02-26) + - [Fixed](#fixed-4) - [8.0.0 (2026-02-26)](#800-2026-02-26) - [Added](#added-1) - [Changed](#changed-3) - [7.6.1 (2026-02-24)](#761-2026-02-24) - - [Fixed](#fixed-4) + - [Fixed](#fixed-5) - [7.6.0 (2026-02-03)](#760-2026-02-03) - [Changed](#changed-4) - [7.5.1 (2026-02-01)](#751-2026-02-01) @@ -29,7 +31,7 @@ - [Added](#added-3) - [7.4.0 (2025-12-15)](#740-2025-12-15) - [Changed](#changed-6) - - [Fixed](#fixed-5) + - [Fixed](#fixed-6) - [7.3.0 (2025-11-21)](#730-2025-11-21) - [Changed](#changed-7) - [7.2.1 (2025-11-01)](#721-2025-11-01) @@ -41,9 +43,9 @@ - [7.1.3 (2025-10-23)](#713-2025-10-23) - [Changed](#changed-10) - [7.1.2 (2025-10-22)](#712-2025-10-22) - - [Fixed](#fixed-6) - - [7.1.1 (2025-10-22)](#711-2025-10-22) - [Fixed](#fixed-7) + - [7.1.1 (2025-10-22)](#711-2025-10-22) + - [Fixed](#fixed-8) - [7.1.0 (2025-10-22)](#710-2025-10-22) - [Changed](#changed-11) - [7.0.1 (2025-10-13)](#701-2025-10-13) @@ -66,7 +68,7 @@ - [Added](#added-8) - [5.4.0 (2025-09-23)](#540-2025-09-23) - [Changed](#changed-18) - - [Fixed](#fixed-8) + - [Fixed](#fixed-9) - [5.3.0 (2025-09-21)](#530-2025-09-21) - [Added](#added-9) - [5.2.0 (2025-08-25)](#520-2025-08-25) @@ -80,12 +82,12 @@ - [5.1.0 (2025-07-05)](#510-2025-07-05) - [Changed](#changed-22) - [5.0.1 (2025-06-27)](#501-2025-06-27) - - [Fixed](#fixed-9) + - [Fixed](#fixed-10) - [5.0.0 (2025-06-27)](#500-2025-06-27) - [Added](#added-11) - [Changed](#changed-23) - [4.0.1 (2025-06-24)](#401-2025-06-24) - - [Fixed](#fixed-10) + - [Fixed](#fixed-11) - [4.0.0 (2025-06-24)](#400-2025-06-24) - [Added](#added-12) - [Changed](#changed-24) @@ -102,7 +104,7 @@ - [3.8.10 (2025-05-20)](#3810-2025-05-20) - [Changed](#changed-29) - [3.8.9 (2025-05-12)](#389-2025-05-12) - - [Fixed](#fixed-11) + - [Fixed](#fixed-12) - [3.8.8 (2025-05-12)](#388-2025-05-12) - [Changed](#changed-30) - [3.8.7 (2025-05-12)](#387-2025-05-12) @@ -110,15 +112,15 @@ - [3.8.6 (2025-04-09)](#386-2025-04-09) - [Changed](#changed-31) - [3.8.5 (2025-04-03)](#385-2025-04-03) - - [Fixed](#fixed-12) - - [3.8.4 (2025-04-03)](#384-2025-04-03) - [Fixed](#fixed-13) - - [3.8.3 (2025-04-03)](#383-2025-04-03) + - [3.8.4 (2025-04-03)](#384-2025-04-03) - [Fixed](#fixed-14) - - [3.8.2 (2025-04-03)](#382-2025-04-03) + - [3.8.3 (2025-04-03)](#383-2025-04-03) - [Fixed](#fixed-15) - - [3.8.1 (2025-04-03)](#381-2025-04-03) + - [3.8.2 (2025-04-03)](#382-2025-04-03) - [Fixed](#fixed-16) + - [3.8.1 (2025-04-03)](#381-2025-04-03) + - [Fixed](#fixed-17) - [Changed](#changed-32) - [3.8.0 (2025-04-03)](#380-2025-04-03) - [Added](#added-15) @@ -157,9 +159,9 @@ - [3.2.5 (2024-10-24)](#325-2024-10-24) - [Changed](#changed-47) - [3.2.4 (2024-10-17)](#324-2024-10-17) - - [Fixed](#fixed-17) - - [3.2.3 (2024-10-16)](#323-2024-10-16) - [Fixed](#fixed-18) + - [3.2.3 (2024-10-16)](#323-2024-10-16) + - [Fixed](#fixed-19) - [3.2.2 (2024-10-09)](#322-2024-10-09) - [Changed](#changed-48) - [3.2.1 (2024-09-20)](#321-2024-09-20) @@ -169,18 +171,18 @@ - [3.1.2 (2024-08-23)](#312-2024-08-23) - [Changed](#changed-51) - [3.1.1 (2024-08-23)](#311-2024-08-23) - - [Fixed](#fixed-19) + - [Fixed](#fixed-20) - [3.1.0 (2024-08-22)](#310-2024-08-22) - [Added](#added-19) - [3.0.6 (2024-08-22)](#306-2024-08-22) - [Changed](#changed-52) - [3.0.5 (2024-08-21)](#305-2024-08-21) - - [Fixed](#fixed-20) + - [Fixed](#fixed-21) - [3.0.4 (2024-08-21)](#304-2024-08-21) - [Changed](#changed-53) - [Added](#added-20) - [2.9.3 (2024-08-16)](#293-2024-08-16) - - [Fixed](#fixed-21) + - [Fixed](#fixed-22) - [2.9.2 (2024-08-13)](#292-2024-08-13) - [Changed](#changed-54) - [2.9.1 (2024-08-10)](#291-2024-08-10) @@ -189,16 +191,16 @@ - [2.9.0 (2024-08-01)](#290-2024-08-01) - [Added](#added-22) - [Changed](#changed-56) - - [Fixed](#fixed-22) + - [Fixed](#fixed-23) - [2.8.0](#280) - [Added](#added-23) - [Changed](#changed-57) - - [Fixed](#fixed-23) + - [Fixed](#fixed-24) - [2.7.3](#273) - [Changed](#changed-58) - - [Fixed](#fixed-24) - - [2.7.2](#272) - [Fixed](#fixed-25) + - [2.7.2](#272) + - [Fixed](#fixed-26) - [2.7.0](#270) - [Changed](#changed-59) - [2.6.2](#262) @@ -217,6 +219,15 @@ - [2.0.0](#200) - [Changed](#changed-62) +## 8.1.1 (2026-03-12) + +### Fixed + +* `ingress-extra.yaml`: fixed invalid YAML document separator (`---apiVersion:` merged onto one line) caused by aggressive whitespace trimming in the template +* `test-api-documents.yaml`: fixed wrong document ID in DELETE call (`test` instead of `test-document-id-13`) +* `httproute-extra.yaml`: added guard comment near `---` separator to prevent the same whitespace trimming bug +* Minor misprints in `values.yaml` + ## 8.1.0 (2026-02-28) ### Added diff --git a/charts/document-engine/Chart.yaml b/charts/document-engine/Chart.yaml index eac3c237..e2bfd2e6 100644 --- a/charts/document-engine/Chart.yaml +++ b/charts/document-engine/Chart.yaml @@ -4,7 +4,7 @@ type: application description: Document Engine is a backend software for processing documents and powering automation workflows. home: https://www.nutrient.io/sdk/document-engine icon: https://cdn.prod.website-files.com/65fdb7696055f07a05048833/66e58e33c3880ff24aa34027_nutrient-logo.png -version: 8.1.0 +version: 8.1.1 appVersion: "1.14.0" keywords: diff --git a/charts/document-engine/README.md b/charts/document-engine/README.md index 3fa3b134..b2baccd2 100644 --- a/charts/document-engine/README.md +++ b/charts/document-engine/README.md @@ -1,6 +1,6 @@ # Document Engine Helm chart -![Version: 8.1.0](https://img.shields.io/badge/Version-8.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.14.0](https://img.shields.io/badge/AppVersion-1.14.0-informational?style=flat-square) +![Version: 8.1.1](https://img.shields.io/badge/Version-8.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.14.0](https://img.shields.io/badge/AppVersion-1.14.0-informational?style=flat-square) Document Engine is a backend software for processing documents and powering automation workflows. @@ -419,11 +419,11 @@ Note: | [`config.maxUploadSizeMegaBytes`](./values.yaml#L103) | `MAX_UPLOAD_SIZE_BYTES` in megabytes | `950` | | [`config.minSearchQueryLength`](./values.yaml#L127) | `MIN_SEARCH_QUERY_LENGTH` | `3` | | [`config.port`](./values.yaml#L165) | `PORT` for the Document Engine API | `5000` | -| [`config.proxy`](./values.yaml#L160) | Proxy settings, `HTTP_PROXY` amd `HTTPS_PROXY` | `{"http":"","https":""}` | +| [`config.proxy`](./values.yaml#L160) | Proxy settings, `HTTP_PROXY` and `HTTPS_PROXY` | `{"http":"","https":""}` | | [`config.readAnnotationBatchTimeoutSeconds`](./values.yaml#L100) | `READ_ANNOTATION_BATCH_TIMEOUT` in seconds | `20` | | [`config.replaceSecretsFromEnv`](./values.yaml#L170) | `REPLACE_SECRETS_FROM_ENV` — whether to consider environment variables, values and secrets for `JWT_PUBLIC_KEY`, `SECRET_KEY_BASE` and `DASHBOARD_PASSWORD` | `true` | | [`config.requestTimeoutSeconds`](./values.yaml#L88) | Full request timeout in seconds (`SERVER_REQUEST_TIMEOUT`). Should be lesser than `terminationGracePeriodSeconds`. | `60` | -| [`config.trustedProxies`](./values.yaml#L157) | `TRUSTED_PROXIES` — comma-separated list of IP addresses or IP address ranges of trusted proxies. Setting to `default` will use the default will use private IP ranges. | `"default"` | +| [`config.trustedProxies`](./values.yaml#L157) | `TRUSTED_PROXIES` — comma-separated list of IP addresses or IP address ranges of trusted proxies. Setting to `default` will use private IP ranges. | `"default"` | | [`config.urlFetchTimeoutSeconds`](./values.yaml#L97) | `REMOTE_URL_FETCH_TIMEOUT` in seconds | `5` | | [`config.workerPoolSize`](./values.yaml#L85) | `PSPDFKIT_WORKER_POOL_SIZE` | `16` | | [`config.workerTimeoutSeconds`](./values.yaml#L91) | Document processing timeout in seconds (`PSPDFKIT_WORKER_TIMEOUT`). Should not be greater than `config.requestTimeoutSeconds`. | `60` | @@ -547,8 +547,8 @@ Note: | Key | Description | Default | |-----|-------------|---------| | [`documentConversion`](./values.yaml#L581) | Document conversion parameters | | -| [`documentConversion.spreadsheetMaxContentHeightMm`](./values.yaml#L585) | Maximal spreadhseet content height in millimetres (`SPREADSHEET_MAX_CONTENT_HEIGHT_MM`). Defaults to `0` for unlimited height. | `0` | -| [`documentConversion.spreadsheetMaxContentWidthMm`](./values.yaml#L589) | Maximal spreadhseet content width in millimetres (`SPREADSHEET_MAX_CONTENT_WIDTH_MM`). Defaults to `0` for unlimited width. | `0` | +| [`documentConversion.spreadsheetMaxContentHeightMm`](./values.yaml#L585) | Maximal spreadsheet content height in millimetres (`SPREADSHEET_MAX_CONTENT_HEIGHT_MM`). Defaults to `0` for unlimited height. | `0` | +| [`documentConversion.spreadsheetMaxContentWidthMm`](./values.yaml#L589) | Maximal spreadsheet content width in millimetres (`SPREADSHEET_MAX_CONTENT_WIDTH_MM`). Defaults to `0` for unlimited width. | `0` | ### Clustering @@ -664,13 +664,14 @@ Note: | [`observability.log.level`](./values.yaml#L662) | `LOG_LEVEL` | `"info"` | | [`observability.log.structured`](./values.yaml#L665) | `LOG_STRUCTURED` — enable structured logging in JSON format | `false` | | [`observability.metrics`](./values.yaml#L703) | Metrics configuration | [...](./values.yaml#L703) | -| [`observability.metrics.customTags`](./values.yaml#L712) | Prometheus metrics endpoint settings | `namespace={{ .Release.Namespace }},app={{ include "document-engine.fullname" . }}` | +| [`observability.metrics.customTags`](./values.yaml#L709) | Global metrics tags for all exporters: `METRICS_CUSTOM_TAGS` | *generated* | | [`observability.metrics.grafanaDashboard`](./values.yaml#L751) | Grafana dashboard | [...](./values.yaml#L751) | | [`observability.metrics.grafanaDashboard.configMap`](./values.yaml#L759) | ConfigMap parameters | [...](./values.yaml#L759) | | [`observability.metrics.grafanaDashboard.configMap.labels`](./values.yaml#L762) | ConfigMap labels | `{"grafana_dashboard":"1"}` | | [`observability.metrics.grafanaDashboard.enabled`](./values.yaml#L755) | Enable Grafana dashboard. To work, requires Prometheus metrics enabled in `observability.metrics.prometheusEndpoint.enabled` | `false` | | [`observability.metrics.grafanaDashboard.tags`](./values.yaml#L772) | Dashboard tags | `["Nutrient","document-engine"]` | | [`observability.metrics.grafanaDashboard.title`](./values.yaml#L769) | Dashboard title | *generated* | +| [`observability.metrics.prometheusEndpoint`](./values.yaml#L713) | Prometheus metrics endpoint settings | [...](./values.yaml#L713) | | [`observability.metrics.prometheusEndpoint.enabled`](./values.yaml#L716) | Enable Prometheus metrics endpoint, `ENABLE_PROMETHEUS` | `false` | | [`observability.metrics.prometheusEndpoint.port`](./values.yaml#L719) | Port for the Prometheus metrics endpoint, `PROMETHEUS_PORT` | `10254` | | [`observability.metrics.prometheusRule`](./values.yaml#L743) | Prometheus [PrometheusRule](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.PrometheusRule) Requires `observability.metrics.prometheusEndpoint.enabled` to be `true` | [...](./values.yaml#L743) | diff --git a/charts/document-engine/templates/httproute-extra.yaml b/charts/document-engine/templates/httproute-extra.yaml index 0c0460d6..bdf138f3 100644 --- a/charts/document-engine/templates/httproute-extra.yaml +++ b/charts/document-engine/templates/httproute-extra.yaml @@ -4,6 +4,7 @@ {{- range $routeName, $routeConfig := .Values.gateway.extraHTTPRoutes }} {{- if $routeConfig.enabled }} --- +# NOTE: Do not left-trim between --- and apiVersion, it merges them into ---apiVersion: apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: diff --git a/charts/document-engine/templates/ingress-extra.yaml b/charts/document-engine/templates/ingress-extra.yaml index a31648ae..16fd5ad1 100644 --- a/charts/document-engine/templates/ingress-extra.yaml +++ b/charts/document-engine/templates/ingress-extra.yaml @@ -8,8 +8,7 @@ {{- end }} {{- end }} --- - -{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}} +{{ 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 diff --git a/charts/document-engine/templates/tests/test-api-documents.yaml b/charts/document-engine/templates/tests/test-api-documents.yaml index edaae243..d08af388 100644 --- a/charts/document-engine/templates/tests/test-api-documents.yaml +++ b/charts/document-engine/templates/tests/test-api-documents.yaml @@ -44,7 +44,7 @@ data: echo -e "\nDeleting the test document..." curl --silent \ --request DELETE \ - --url ${URL}/api/documents?document_id=test \ + --url ${URL}/api/documents?document_id=test-document-id-13 \ --header "${AUTH_HEADER}" echo -e "\nChecking if the document was deleted..." diff --git a/charts/document-engine/values.yaml b/charts/document-engine/values.yaml index cfcf5817..a018e99e 100644 --- a/charts/document-engine/values.yaml +++ b/charts/document-engine/values.yaml @@ -152,10 +152,10 @@ config: # Do not change unless explicitly recommended by Nutrient support. checkoutTimeoutMilliseconds: 5000 # -- `TRUSTED_PROXIES` — comma-separated list of IP addresses or IP address ranges of trusted proxies. - # Setting to `default` will use the default will use private IP ranges. + # Setting to `default` will use private IP ranges. # @section -- 03. Configuration options trustedProxies: default - # -- Proxy settings, `HTTP_PROXY` amd `HTTPS_PROXY` + # -- Proxy settings, `HTTP_PROXY` and `HTTPS_PROXY` # @section -- 03. Configuration options proxy: http: "" @@ -579,11 +579,11 @@ documentSigningService: # @section -- 09. Document conversion # @notationType -- none documentConversion: - # -- Maximal spreadhseet content height in millimetres (`SPREADSHEET_MAX_CONTENT_HEIGHT_MM`). + # -- Maximal spreadsheet content height in millimetres (`SPREADSHEET_MAX_CONTENT_HEIGHT_MM`). # Defaults to `0` for unlimited height. # @section -- 09. Document conversion spreadsheetMaxContentHeightMm: 0 - # -- Maximal spreadhseet content width in millimetres (`SPREADSHEET_MAX_CONTENT_WIDTH_MM`). + # -- Maximal spreadsheet content width in millimetres (`SPREADSHEET_MAX_CONTENT_WIDTH_MM`). # Defaults to `0` for unlimited width. # @section -- 09. Document conversion spreadsheetMaxContentWidthMm: 0 @@ -706,10 +706,10 @@ observability: # @notationType -- tpl # @default -- *generated* # @notationType -- plain + customTags: "namespace={{ .Release.Namespace }},app={{ include \"document-engine.fullname\" . }}" # -- (object) Prometheus metrics endpoint settings # @section -- D. Observability # @notationType -- reference - customTags: "namespace={{ .Release.Namespace }},app={{ include \"document-engine.fullname\" . }}" prometheusEndpoint: # -- Enable Prometheus metrics endpoint, `ENABLE_PROMETHEUS` # @section -- D. Observability