diff --git a/.agents/skills/add-to-release-please/SKILL.md b/.agents/skills/add-to-release-please/SKILL.md new file mode 100644 index 00000000..c687e850 --- /dev/null +++ b/.agents/skills/add-to-release-please/SKILL.md @@ -0,0 +1,141 @@ +--- +name: add-to-release-please +description: >- + Register a package in release-please by updating release-please-config.json + and .release-please-manifest.json, and aligning publish workflows to the new + tag prefix. Use when adding an app, Helm chart, or package to release-please, + onboarding a new release path, or when the user mentions release-please + config or manifest. +--- + +# Add to release-please + +Register a package so release-please can version it, write changelogs, and create tags/releases. + +## When to Use + +- Adding an app, library, or Helm chart to release-please +- Onboarding a new release path in this monorepo +- Updating release-please config or manifest for a new package + +## Instructions + +### 1. Work out the path + +Work out the path to use, or ask the user what path to use. + +The path is the package key in both config files (repo-relative directory). Confirm it exists and is not already in `release-please-config.json`. + +| Kind | Path examples | +|---|---| +| App | `cogstack-cohorter` | +| Helm chart | `helm-charts/medcat-service-helm` | + +Helm charts in this repo are top-level directories under `helm-charts//` with a `Chart.yaml`. The package key is that directory. See [Helm charts](#helm-charts) before editing. + +### 2. Update `release-please-config.json` + +Update `release-please-config.json` with the path. Work out the release-type. It's probably `python`, `helm`, `node`, or `simple`. + +Add under `packages`. Match the file's 4-space indent. + +```json +"": { + "release-type": "", + "component": "", + "changelog-path": "CHANGELOG.md", + "bump-minor-pre-major": false, + "bump-patch-for-minor-pre-major": false, + "draft": false, + "prerelease": false +} +``` + +**`release-type`:** + +| Type | When | Bumps | +|---|---|---| +| `python` | Root `pyproject.toml` | `$.project.version` | +| `node` | Root `package.json` | `version` | +| `helm` | Chart dir with `Chart.yaml` | `version` | +| `simple` | No single root version file, or nested API + frontend | CHANGELOG only; use `extra-files` for nested bumps | + +`component` is the git tag prefix: `{component}-v{version}` (e.g. `cohorter-v0.7.0`). For Helm charts in this repo, `component` is the package path (`helm-charts/`), so the tag is `helm-charts/-v`. + +**`extra-files`** (paths relative to the package directory) — e.g. python API + node frontend under `simple`: + +```json +"extra-files": [ + { + "type": "toml", + "path": "api/pyproject.toml", + "jsonpath": "$.project.version" + }, + { + "type": "json", + "path": "frontend/package.json", + "jsonpath": "$.version" + } +] +``` + +### Helm charts + +Copy an existing chart entry such as `helm-charts/medcat-service-helm`. Charts here always use `release-type` `helm`, `component` equal to the package key, and these changelog sections. Do not add `extra-files`. + +`` is the directory name (for example `ocr-service-helm`). It must match `name` in `Chart.yaml`, and `Chart.yaml` must sit directly under `helm-charts/` (not nested). + +```json +"helm-charts/": { + "release-type": "helm", + "component": "helm-charts/", + "changelog-path": "CHANGELOG.md", + "bump-minor-pre-major": false, + "bump-patch-for-minor-pre-major": false, + "draft": false, + "prerelease": false, + "changelog-sections": [ + { "type": "feat", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "build", "section": "Dependencies" }, + { "type": "refactor", "section": "Code Refactoring" }, + { "type": "revert", "section": "Reverts" } + ] +} +``` + +`.github/workflows/kubernetes-charts-build.yaml` already discovers every `helm-charts/*/Chart.yaml` and publishes tags matching `helm-charts/*-v*.*.*`. Do not add a workflow or edit `release-please.yml` for a chart that fits this layout. Release-please writes `CHANGELOG.md` on the first release. + +### 3. Update `.release-please-manifest.json` + +Update `.release-please-manifest.json` by finding the most recent version based on the tags in git. + +The manifest value is the **last released** version. The next tag is a bump from that version (`0.1.0` plus a `feat` commit becomes `0.2.0`). + +1. `git tag -l '**' | sort -V` +2. Take the highest semver; strip the prefix (`helm-charts/medcat-service-helm-v0.6.0` → `0.6.0`) +3. If the user states a version, confirm it against git tags +4. If tags exist, add `"": ""` (same path key as in the config) +5. If there are no tags, the package has never been released. Set the manifest to `0.0.0` and set `initial-version` on the package to the first tag you want (for example `"initial-version": "0.1.0"`). `0.0.0` is not treated as a prior release, so the first release is `initial-version` rather than a bump. Without `initial-version`, that first release defaults to `1.0.0`. Do not copy `Chart.yaml` `version` into the manifest for an unreleased chart. + +### 4. Update GitHub workflows if the tag format changes + +Skip this step for a Helm chart registered as in [Helm charts](#helm-charts). The shared chart workflow already matches `helm-charts/*-v*.*.*`. + +For other packages, release-please tags are `{component}-v{version}`. If workflows still match an old prefix that uses a forward slash (e.g. `cogstack-cohorter/v*`): + +1. `on.push.tags` → `{component}-v*` +2. Version strip / docker metadata patterns → after `{component}-v` +3. Attach artifacts to the release-please GitHub Release (do not create a draft release) + +```bash +rg -n '|tags:' .github/workflows/* +``` + +### Done when + +- [ ] Path chosen (or confirmed with user) +- [ ] `packages` entry in `release-please-config.json` +- [ ] Helm charts use the path, `component`, and `changelog-sections` from [Helm charts](#helm-charts) +- [ ] Manifest entry is the latest git tag, or `0.0.0` plus `initial-version` when the package has never been released +- [ ] Workflows updated if the tag prefix changed, except Helm charts that already match `helm-charts/*-v*.*.*` diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 47a84b40..9e79f8c1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -4,5 +4,6 @@ "helm-charts/cogstack-ce-helm": "0.5.0", "helm-charts/cogstack-cohorter-helm": "0.4.1", "helm-charts/cogstack-observability-helm": "0.4.1", - "helm-charts/cogstack-jupyterhub-helm": "0.4.1" + "helm-charts/cogstack-jupyterhub-helm": "0.4.1", + "helm-charts/ocr-service-helm": "0.0.0" } \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 5be9f699..a28e433e 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -72,6 +72,7 @@ nav: - Cogstack CE Helm: platform/deployment/helm/charts/cogstack-ce-helm.md - MedCAT Service Helm: platform/deployment/helm/charts/medcat-service-helm.md - MedCAT Trainer Helm: platform/deployment/helm/charts/medcat-trainer-helm.md + - OCR Service Helm: platform/deployment/helm/charts/ocr-service-helm.md - Cogstack Cohorter Helm: platform/deployment/helm/charts/cogstack-cohorter-helm.md - Cogstack Observability Helm: platform/deployment/helm/charts/cogstack-observability-helm.md - Cogstack JupyterHub Helm: platform/deployment/helm/charts/cogstack-jupyterhub-helm.md diff --git a/helm-charts/cogstack-ce-helm/README.md b/helm-charts/cogstack-ce-helm/README.md index 78ea0e1e..4d2af3af 100644 --- a/helm-charts/cogstack-ce-helm/README.md +++ b/helm-charts/cogstack-ce-helm/README.md @@ -1,7 +1,6 @@ # CogStack Community Edition Helm Chart -This is a all in one helm chart that runs CogStack on Kubernetes.
-Description for Community Edition (CogStack CE) can be found [here](../../../../cogstack-ce/_index.md) +This is a all in one helm chart that runs CogStack on Kubernetes ## Overview diff --git a/helm-charts/cogstack-ce-helm/README.md.gotmpl b/helm-charts/cogstack-ce-helm/README.md.gotmpl index 77704cc5..1a2cf277 100644 --- a/helm-charts/cogstack-ce-helm/README.md.gotmpl +++ b/helm-charts/cogstack-ce-helm/README.md.gotmpl @@ -2,6 +2,8 @@ This is a all in one helm chart that runs CogStack on Kubernetes +The description for Community Edition (CogStack CE) can be found [here](../../../../cogstack-ce/_index.md) + ## Overview This chart is an umbrella chart that deploys: diff --git a/helm-charts/cogstack-cohorter-helm/README.md b/helm-charts/cogstack-cohorter-helm/README.md index a3f39f11..d0d9e6e5 100644 --- a/helm-charts/cogstack-cohorter-helm/README.md +++ b/helm-charts/cogstack-cohorter-helm/README.md @@ -132,7 +132,7 @@ For issues and questions, please visit the [CogStack GitHub repository](https:// | Repository | Name | Version | |------------|------|---------| -| https://otwld.github.io/ollama-helm/ | ollama(ollama) | >=0.1.0 | +| https://otwld.github.io/ollama-helm/ | ollama(ollama) | 1.54.0 | | oci://registry-1.docker.io/cogstacksystems | medcat(medcat-service-helm) | 0.0.1 | ## Values diff --git a/helm-charts/ocr-service-helm/.helmignore b/helm-charts/ocr-service-helm/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/helm-charts/ocr-service-helm/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm-charts/ocr-service-helm/Chart.yaml b/helm-charts/ocr-service-helm/Chart.yaml new file mode 100644 index 00000000..fbcd1e41 --- /dev/null +++ b/helm-charts/ocr-service-helm/Chart.yaml @@ -0,0 +1,41 @@ +apiVersion: v2 +name: ocr-service-helm +description: A Helm chart to deploy CogStack OCR Service + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# 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. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.1.1" + +keywords: + - cogstack + - ocr + - rest-api + +home: https://docs.cogstack.org/ +sources: + - https://github.com/CogStack/cogstack-platform + - https://github.com/CogStack/cogstack-ocr-service + +maintainers: + - name: vladd-bit + email: 62345326+vladd-bit@users.noreply.github.com + url: https://github.com/CogStack + +icon: "https://avatars.githubusercontent.com/u/28688163" diff --git a/helm-charts/ocr-service-helm/README.md b/helm-charts/ocr-service-helm/README.md new file mode 100644 index 00000000..e36627f6 --- /dev/null +++ b/helm-charts/ocr-service-helm/README.md @@ -0,0 +1,123 @@ +# ocr-service Helm Chart + +A Helm chart to deploy CogStack OCR Service + +**Homepage:** + +## Installation + +```sh +helm install ocr-service oci://registry-1.docker.io/cogstacksystems/ocr-service-helm +``` + +## Usage +For local testing, by default you can port forward the service using this command: + +```sh +kubectl port-forward svc/ocr-service 8090:8090 +``` + +Then navigate to http://localhost:8090 to try the service. You can also use http://localhost:8090/docs to view the REST APIs + +## Configuration + +To configure the service, create a values.yaml file and install with helm. + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| env.OCR_SERVICE_CONVERTER_THREADS | string | `"1"` | | +| env.OCR_SERVICE_CPU_THREADS | string | `"1"` | | +| env.OCR_SERVICE_DEBUG_MODE | string | `"false"` | | +| env.OCR_SERVICE_GUNICORN_GRACEFUL_TIMEOUT | string | `"30"` | | +| env.OCR_SERVICE_GUNICORN_LOG_FILE_PATH | string | `"-"` | | +| env.OCR_SERVICE_GUNICORN_LOG_LEVEL | string | `"info"` | | +| env.OCR_SERVICE_GUNICORN_MAX_REQUESTS | string | `"50000"` | | +| env.OCR_SERVICE_GUNICORN_MAX_REQUESTS_JITTER | string | `"5000"` | | +| env.OCR_SERVICE_GUNICORN_TIMEOUT | string | `"300"` | | +| env.OCR_SERVICE_HOST | string | `"0.0.0.0"` | | +| env.OCR_SERVICE_IMAGE_DPI | string | `"200"` | | +| env.OCR_SERVICE_LIBRE_OFFICE_PROCESS_TIMEOUT | string | `"20"` | | +| env.OCR_SERVICE_LOG_LEVEL | string | `"20"` | | +| env.OCR_SERVICE_OPERATION_MODE | string | `"OCR"` | | +| env.OCR_SERVICE_PORT | string | `"8090"` | | +| env.OCR_SERVICE_TESSERACT_CUSTOM_CONFIG_FLAGS | string | `""` | | +| env.OCR_SERVICE_TESSERACT_LANG | string | `"eng"` | | +| env.OCR_SERVICE_TESSERACT_NICE | string | `"-18"` | | +| env.OCR_SERVICE_TESSERACT_TIMEOUT | string | `"30"` | | +| env.OCR_SERVICE_WORKER_CLASS | string | `"sync"` | | +| env.OCR_TMP_DIR | string | `"/ocr_service/tmp"` | | +| env.OCR_WEB_SERVICE_WORKERS | string | `"1"` | | +| envValueFrom | object | `{"K8S_NODE_NAME":{"fieldRef":{"fieldPath":"spec.nodeName"}},"K8S_POD_NAME":{"fieldRef":{"fieldPath":"metadata.name"}},"K8S_POD_NAMESPACE":{"fieldRef":{"fieldPath":"metadata.namespace"}},"K8S_POD_UID":{"fieldRef":{"fieldPath":"metadata.uid"}}}` | Allow setting env values from field/configmap/secret references. Defaults to include k8s details for observability. | +| extraInitContainers | list | `[]` | Additional init containers to run before the main container. Can be templated | +| extraManifests | list | `[]` | Additional manifests to deploy to kubernetes. Can be templated | +| fullnameOverride | string | `""` | | +| hostAliases | list | `[]` | Host aliases for the pod | +| httpRoute | object | `{"annotations":{},"enabled":false,"hostnames":["chart-example.local"],"parentRefs":[{"name":"gateway","sectionName":"http"}],"rules":[{"matches":[{"path":{"type":"PathPrefix","value":"/headers"}}]}]}` | Expose the service via gateway-api HTTPRoute Requires Gateway API resources and suitable controller installed within the cluster (see: https://gateway-api.sigs.k8s.io/guides/) | +| image | object | `{"pullPolicy":"IfNotPresent","repository":"cogstacksystems/cogstack-ocr-service"}` | This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ | +| image.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. | +| image.repository | string | `"cogstacksystems/cogstack-ocr-service"` | Image repository for the MedCAT service container | +| imagePullSecrets | list | `[]` | This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| livenessProbe.failureThreshold | int | `3` | | +| livenessProbe.httpGet.path | string | `"/api/health"` | | +| livenessProbe.httpGet.port | string | `"http"` | | +| livenessProbe.initialDelaySeconds | int | `30` | | +| livenessProbe.periodSeconds | int | `30` | | +| livenessProbe.timeoutSeconds | int | `5` | | +| nameOverride | string | `""` | This is to override the chart name. | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | This is for setting Kubernetes Annotations to a Pod. For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ | +| podLabels | object | `{}` | This is for setting Kubernetes Labels to a Pod. For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | +| podSecurityContext.fsGroup | int | `10001` | | +| podSecurityContext.fsGroupChangePolicy | string | `"OnRootMismatch"` | | +| readinessProbe.failureThreshold | int | `6` | | +| readinessProbe.httpGet.path | string | `"/api/ready"` | | +| readinessProbe.httpGet.port | string | `"http"` | | +| readinessProbe.initialDelaySeconds | int | `20` | | +| readinessProbe.periodSeconds | int | `10` | | +| readinessProbe.timeoutSeconds | int | `5` | | +| replicaCount | int | `1` | This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ | +| resources | object | `{}` | Configure resources for the pod. More information can be found here: https://kubernetes.io/docs/concepts/containers/ Recommendation for a default production model is { requests: { cpu: 500m, memory: 512Mi }, limits: { cpu: null , memory: 1Gi } } | +| runtimeClassName | string | `""` | Runtime class name for the pod (e.g., "nvidia" for GPU workloads) More information: https://kubernetes.io/docs/concepts/containers/runtime-class/ | +| securityContext.allowPrivilegeEscalation | bool | `false` | | +| securityContext.capabilities.drop[0] | string | `"ALL"` | | +| securityContext.readOnlyRootFilesystem | bool | `false` | | +| securityContext.runAsGroup | int | `10001` | | +| securityContext.runAsNonRoot | bool | `true` | | +| securityContext.runAsUser | int | `10001` | | +| service.port | int | `8090` | This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports | +| service.type | string | `"ClusterIP"` | This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.automount | bool | `true` | Automatically mount a ServiceAccount's API credentials? | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | +| startupProbe.failureThreshold | int | `90` | | +| startupProbe.httpGet.path | string | `"/api/ready"` | | +| startupProbe.httpGet.port | string | `"http"` | | +| startupProbe.initialDelaySeconds | int | `2` | | +| startupProbe.periodSeconds | int | `10` | | +| startupProbe.timeoutSeconds | int | `5` | | +| tmp.emptyDir.medium | string | `""` | | +| tmp.emptyDir.sizeLimit | string | `"1Gi"` | | +| tmp.enabled | bool | `true` | | +| tmp.mountPath | string | `"/ocr_service/tmp"` | | +| tolerations | list | `[]` | | +| updateStrategy.type | string | `"RollingUpdate"` | Used for Kubernetes deployment .spec.strategy.type. Allowed values are "Recreate" or "RollingUpdate". | +| volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. | +| volumes | list | `[]` | Additional volumes on the output Deployment definition. | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) \ No newline at end of file diff --git a/helm-charts/ocr-service-helm/README.md.gotmpl b/helm-charts/ocr-service-helm/README.md.gotmpl new file mode 100644 index 00000000..6d098252 --- /dev/null +++ b/helm-charts/ocr-service-helm/README.md.gotmpl @@ -0,0 +1,33 @@ +# ocr-service Helm Chart + +{{ template "chart.description" . }} + +{{ template "chart.homepageLine" . }} + +## Installation + +```sh +helm install ocr-service oci://registry-1.docker.io/cogstacksystems/ocr-service-helm +``` + +## Usage +For local testing, by default you can port forward the service using this command: + +```sh +kubectl port-forward svc/ocr-service 8090:8090 +``` + +Then navigate to http://localhost:8090 to try the service. You can also use http://localhost:8090/docs to view the REST APIs + + +## Configuration + +To configure the service, create a values.yaml file and install with helm. + + + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +{{ template "helm-docs.versionFooter" . }} \ No newline at end of file diff --git a/helm-charts/ocr-service-helm/templates/NOTES.txt b/helm-charts/ocr-service-helm/templates/NOTES.txt new file mode 100644 index 00000000..df1d5dcb --- /dev/null +++ b/helm-charts/ocr-service-helm/templates/NOTES.txt @@ -0,0 +1,35 @@ +1. Get the application URL by running these commands: +{{- if .Values.httpRoute.enabled }} +{{- if .Values.httpRoute.hostnames }} + export APP_HOSTNAME={{ .Values.httpRoute.hostnames | first }} +{{- else }} + export APP_HOSTNAME=$(kubectl get --namespace {{(first .Values.httpRoute.parentRefs).namespace | default .Release.Namespace }} gateway/{{ (first .Values.httpRoute.parentRefs).name }} -o jsonpath="{.spec.listeners[0].hostname}") + {{- end }} +{{- if and .Values.httpRoute.rules (first .Values.httpRoute.rules).matches (first (first .Values.httpRoute.rules).matches).path.value }} + echo "Visit http://$APP_HOSTNAME{{ (first (first .Values.httpRoute.rules).matches).path.value }} to use your application" + + NOTE: Your HTTPRoute depends on the listener configuration of your gateway and your HTTPRoute rules. + The rules can be set for path, method, header and query parameters. + You can check the gateway configuration with 'kubectl get --namespace {{(first .Values.httpRoute.parentRefs).namespace | default .Release.Namespace }} gateway/{{ (first .Values.httpRoute.parentRefs).name }} -o yaml' +{{- end }} +{{- else if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "ocr-service-helm.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "ocr-service-helm.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "ocr-service-helm.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "ocr-service-helm.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/helm-charts/ocr-service-helm/templates/_helpers.tpl b/helm-charts/ocr-service-helm/templates/_helpers.tpl new file mode 100644 index 00000000..1a9d1467 --- /dev/null +++ b/helm-charts/ocr-service-helm/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "ocr-service-helm.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +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 "ocr-service-helm.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- $basename := $name | trimSuffix "-helm" }} +{{- if or (contains $name .Release.Name) (eq .Release.Name $basename) }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ocr-service-helm.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "ocr-service-helm.labels" -}} +helm.sh/chart: {{ include "ocr-service-helm.chart" . }} +{{ include "ocr-service-helm.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "ocr-service-helm.selectorLabels" -}} +app.kubernetes.io/name: {{ include "ocr-service-helm.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ocr-service-helm.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "ocr-service-helm.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/helm-charts/ocr-service-helm/templates/deployment.yaml b/helm-charts/ocr-service-helm/templates/deployment.yaml new file mode 100644 index 00000000..856655c1 --- /dev/null +++ b/helm-charts/ocr-service-helm/templates/deployment.yaml @@ -0,0 +1,116 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "ocr-service-helm.fullname" . }} + labels: + {{- include "ocr-service-helm.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "ocr-service-helm.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "ocr-service-helm.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "ocr-service-helm.serviceAccountName" . }} + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + {{- range $key, $value := .Values.envValueFrom }} + - name: {{ $key | quote }} + valueFrom: + {{- tpl (toYaml $value) $ | nindent 14 }} + {{- end }} + {{- range $key, $value := .Values.env }} + - name: "{{ tpl $key $ }}" + value: "{{ tpl (print $value) $ }}" + {{- end }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + {{- with .Values.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- if or .Values.volumeMounts .Values.tmp.enabled }} + volumeMounts: + {{- if .Values.tmp.enabled }} + - name: ocr-tmp + mountPath: {{ .Values.tmp.mountPath | quote }} + {{- end }} + {{- with .Values.volumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} + {{- if or .Values.extraInitContainers }} + initContainers: + {{- end }} + {{- $root := . -}} + {{- with .Values.extraInitContainers }} + {{- tpl (toYaml .) $root | nindent 8 }} + {{- end }} + {{- if or .Values.volumes .Values.tmp.enabled }} + volumes: + {{- if .Values.tmp.enabled }} + - name: ocr-tmp + emptyDir: + {{- if .Values.tmp.emptyDir.medium }} + medium: {{ .Values.tmp.emptyDir.medium | quote }} + {{- end }} + {{- if .Values.tmp.emptyDir.sizeLimit }} + sizeLimit: {{ .Values.tmp.emptyDir.sizeLimit | quote }} + {{- end }} + {{- end }} + {{- with .Values.volumes }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.runtimeClassName }} + runtimeClassName: {{ .Values.runtimeClassName | quote }} + {{- end }} \ No newline at end of file diff --git a/helm-charts/ocr-service-helm/templates/extraManifests.yaml b/helm-charts/ocr-service-helm/templates/extraManifests.yaml new file mode 100644 index 00000000..928593c3 --- /dev/null +++ b/helm-charts/ocr-service-helm/templates/extraManifests.yaml @@ -0,0 +1,4 @@ +{{ range .Values.extraManifests }} +--- +{{ tpl (toYaml .) $ }} +{{ end }} \ No newline at end of file diff --git a/helm-charts/ocr-service-helm/templates/hpa.yaml b/helm-charts/ocr-service-helm/templates/hpa.yaml new file mode 100644 index 00000000..898fb8ae --- /dev/null +++ b/helm-charts/ocr-service-helm/templates/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "ocr-service-helm.fullname" . }} + labels: + {{- include "ocr-service-helm.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "ocr-service-helm.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/helm-charts/ocr-service-helm/templates/httproute.yaml b/helm-charts/ocr-service-helm/templates/httproute.yaml new file mode 100644 index 00000000..344938e5 --- /dev/null +++ b/helm-charts/ocr-service-helm/templates/httproute.yaml @@ -0,0 +1,38 @@ +{{- if .Values.httpRoute.enabled -}} +{{- $fullName := include "ocr-service-helm.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "ocr-service-helm.labels" . | nindent 4 }} + {{- with .Values.httpRoute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + parentRefs: + {{- with .Values.httpRoute.parentRefs }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.httpRoute.hostnames }} + hostnames: + {{- toYaml . | nindent 4 }} + {{- end }} + rules: + {{- range .Values.httpRoute.rules }} + {{- with .matches }} + - matches: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} + backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + weight: 1 + {{- end }} +{{- end }} diff --git a/helm-charts/ocr-service-helm/templates/ingress.yaml b/helm-charts/ocr-service-helm/templates/ingress.yaml new file mode 100644 index 00000000..c0da062a --- /dev/null +++ b/helm-charts/ocr-service-helm/templates/ingress.yaml @@ -0,0 +1,43 @@ +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "ocr-service-helm.fullname" . }} + labels: + {{- include "ocr-service-helm.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} + backend: + service: + name: {{ include "ocr-service-helm.fullname" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} +{{- end }} diff --git a/helm-charts/ocr-service-helm/templates/service.yaml b/helm-charts/ocr-service-helm/templates/service.yaml new file mode 100644 index 00000000..804e3ac5 --- /dev/null +++ b/helm-charts/ocr-service-helm/templates/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "ocr-service-helm.fullname" . }} + labels: + {{- include "ocr-service-helm.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + {{- if (and (eq .Values.service.type "NodePort") ( .Values.service.nodePort)) }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} + selector: + {{- include "ocr-service-helm.selectorLabels" . | nindent 4 }} diff --git a/helm-charts/ocr-service-helm/templates/serviceaccount.yaml b/helm-charts/ocr-service-helm/templates/serviceaccount.yaml new file mode 100644 index 00000000..a77077c6 --- /dev/null +++ b/helm-charts/ocr-service-helm/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "ocr-service-helm.serviceAccountName" . }} + labels: + {{- include "ocr-service-helm.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/helm-charts/ocr-service-helm/templates/tests/test-connection.yaml b/helm-charts/ocr-service-helm/templates/tests/test-connection.yaml new file mode 100644 index 00000000..c0e9f4f5 --- /dev/null +++ b/helm-charts/ocr-service-helm/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "ocr-service-helm.fullname" . }}-test-connection" + labels: + {{- include "ocr-service-helm.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "ocr-service-helm.fullname" . }}:{{ .Values.service.port }}/api/health', '-U helm-test {{ .Chart.Name }}-v{{ .Chart.Version }}'] + restartPolicy: Never diff --git a/helm-charts/ocr-service-helm/values-text-only.yaml b/helm-charts/ocr-service-helm/values-text-only.yaml new file mode 100644 index 00000000..c66edeae --- /dev/null +++ b/helm-charts/ocr-service-helm/values-text-only.yaml @@ -0,0 +1,2 @@ +env: + OCR_SERVICE_OPERATION_MODE: "NO_OCR" diff --git a/helm-charts/ocr-service-helm/values.yaml b/helm-charts/ocr-service-helm/values.yaml new file mode 100644 index 00000000..5305f790 --- /dev/null +++ b/helm-charts/ocr-service-helm/values.yaml @@ -0,0 +1,258 @@ +# Default values for medcat-service. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# -- This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +replicaCount: 1 + +# -- This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ +image: + # -- Image repository for the MedCAT service container + repository: cogstacksystems/cogstack-ocr-service + # -- This sets the pull policy for images. + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + # tag: "latest" + +tmp: + enabled: true + mountPath: /ocr_service/tmp + emptyDir: + medium: "" + sizeLimit: 1Gi + + +env: + OCR_SERVICE_HOST: "0.0.0.0" + OCR_SERVICE_PORT: "8090" + OCR_SERVICE_WORKER_CLASS: "sync" + OCR_WEB_SERVICE_WORKERS: "1" + OCR_SERVICE_LOG_LEVEL: "20" + OCR_SERVICE_DEBUG_MODE: "false" + OCR_SERVICE_OPERATION_MODE: "OCR" + OCR_SERVICE_CPU_THREADS: "1" + OCR_SERVICE_CONVERTER_THREADS: "1" + OCR_SERVICE_TESSERACT_LANG: "eng" + OCR_SERVICE_TESSERACT_TIMEOUT: "30" + OCR_SERVICE_TESSERACT_NICE: "-18" + OCR_SERVICE_TESSERACT_CUSTOM_CONFIG_FLAGS: "" + OCR_SERVICE_IMAGE_DPI: "200" + OCR_SERVICE_LIBRE_OFFICE_PROCESS_TIMEOUT: "20" + OCR_SERVICE_GUNICORN_LOG_FILE_PATH: "-" + OCR_SERVICE_GUNICORN_LOG_LEVEL: "info" + OCR_SERVICE_GUNICORN_MAX_REQUESTS_JITTER: "5000" + OCR_SERVICE_GUNICORN_MAX_REQUESTS: "50000" + OCR_SERVICE_GUNICORN_TIMEOUT: "300" + OCR_SERVICE_GUNICORN_GRACEFUL_TIMEOUT: "30" + OCR_TMP_DIR: "/ocr_service/tmp" + + +# -- Allow setting env values from field/configmap/secret references. Defaults to include k8s details for observability. +envValueFrom: + K8S_NODE_NAME: + fieldRef: + fieldPath: spec.nodeName + K8S_POD_NAME: + fieldRef: + fieldPath: metadata.name + K8S_POD_UID: + fieldRef: + fieldPath: metadata.uid + K8S_POD_NAMESPACE: + fieldRef: + fieldPath: metadata.namespace + +# -- This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +imagePullSecrets: [] +# -- This is to override the chart name. +nameOverride: "" +fullnameOverride: "" + +updateStrategy: + # -- Used for Kubernetes deployment .spec.strategy.type. Allowed values are "Recreate" or "RollingUpdate". + type: RollingUpdate + # RollingUpdate default options example + # rollingUpdate: + # maxSurge: 25% + # maxUnavailable: 25% + +# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ +serviceAccount: + # -- Specifies whether a service account should be created + create: true + # -- Automatically mount a ServiceAccount's API credentials? + automount: true + # -- Annotations to add to the service account + annotations: {} + # -- The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +# -- This is for setting Kubernetes Annotations to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +podAnnotations: {} +# -- This is for setting Kubernetes Labels to a Pod. +# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +podLabels: {} + +podSecurityContext: + fsGroup: 10001 + fsGroupChangePolicy: OnRootMismatch + +securityContext: + runAsNonRoot: true + runAsUser: 10001 + runAsGroup: 10001 + allowPrivilegeEscalation: false + readOnlyRootFilesystem: false + capabilities: + drop: + - ALL + + +# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ +service: + # -- This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + type: ClusterIP + # -- This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports + port: 8090 + + +# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +# -- Expose the service via gateway-api HTTPRoute +# Requires Gateway API resources and suitable controller installed within the cluster +# (see: https://gateway-api.sigs.k8s.io/guides/) +httpRoute: + # HTTPRoute enabled. + enabled: false + # HTTPRoute annotations. + annotations: {} + # Which Gateways this Route is attached to. + parentRefs: + - name: gateway + sectionName: http + # namespace: default + # Hostnames matching HTTP header. + hostnames: + - chart-example.local + # List of rules and filters applied. + rules: + - matches: + - path: + type: PathPrefix + value: /headers + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: My-Overwrite-Header + # value: this-is-the-only-value + # remove: + # - User-Agent + # - matches: + # - path: + # type: PathPrefix + # value: /echo + # headers: + # - name: version + # value: v2 + + +# -- Configure resources for the pod. More information can be found here: https://kubernetes.io/docs/concepts/containers/ +# Recommendation for a default production model is { requests: { cpu: 500m, memory: 512Mi }, limits: { cpu: null , memory: 1Gi } } +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 2 # Note one general k8s recommendation is to leave CPU limit unset + # memory: 4Gi + # requests: + # cpu: 1 + # memory: 2Gi + +# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +livenessProbe: + httpGet: + path: /api/health + port: http + failureThreshold: 3 + periodSeconds: 30 + initialDelaySeconds: 30 + timeoutSeconds: 5 +readinessProbe: + httpGet: + path: /api/ready + port: http + failureThreshold: 6 + periodSeconds: 10 + initialDelaySeconds: 20 + timeoutSeconds: 5 +startupProbe: + httpGet: + path: /api/ready + port: http + failureThreshold: 90 + periodSeconds: 10 + initialDelaySeconds: 2 + timeoutSeconds: 5 + +# This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +# -- Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# -- Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +# -- Runtime class name for the pod (e.g., "nvidia" for GPU workloads) +# More information: https://kubernetes.io/docs/concepts/containers/runtime-class/ +runtimeClassName: "" + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# -- Host aliases for the pod +hostAliases: [] + # - ip: "127.0.0.1" + # hostnames: + # - "foo.local" + +# -- Additional init containers to run before the main container. Can be templated +extraInitContainers: [] + +# -- Additional manifests to deploy to kubernetes. Can be templated +extraManifests: [] diff --git a/release-please-config.json b/release-please-config.json index a57de960..cfae4fa0 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -98,6 +98,23 @@ { "type": "refactor", "section": "Code Refactoring" }, { "type": "revert", "section": "Reverts" } ] + }, + "helm-charts/ocr-service-helm": { + "release-type": "helm", + "component": "helm-charts/ocr-service-helm", + "initial-version": "0.1.0", + "changelog-path": "CHANGELOG.md", + "bump-minor-pre-major": false, + "bump-patch-for-minor-pre-major": false, + "draft": false, + "prerelease": false, + "changelog-sections": [ + { "type": "feat", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "build", "section": "Dependencies" }, + { "type": "refactor", "section": "Code Refactoring" }, + { "type": "revert", "section": "Reverts" } + ] } } }