Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- **Helm (Chart 0.1.1): PostgreSQL 18 enablement** — new `postgresql.usePgdataSubdirectory` value (default `false`) allows opt-in use of a `pgdata` subdirectory on the PVC. This pattern is required for fresh PostgreSQL 18+ deployments to avoid PVC metadata conflicts (lost+found). **BREAKING if enabled on existing deployments** — see chart NOTES.txt for migration instructions.

## [0.4.0] - 2026-04-27

### Added
Expand Down
4 changes: 2 additions & 2 deletions helm/optio/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: optio
description: AI Agent Workflow Orchestration
kubeVersion: ">=1.33.0-0"
type: application
version: 0.1.0
appVersion: "0.1.0"
version: 0.1.1
appVersion: "0.4.0"
home: https://github.com/jonwiggins/optio
sources:
- https://github.com/jonwiggins/optio
Expand Down
19 changes: 19 additions & 0 deletions helm/optio/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,22 @@ For Docker Desktop / kind / minikube, also patch with --kubelet-insecure-tls:
-p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]'

Without metrics-server, CPU and memory usage will show as "N/A".

{{- if and .Values.postgresql.enabled (not .Values.postgresql.usePgdataSubdirectory) }}

---

POSTGRESQL DATA DIRECTORY

PostgreSQL is using the PVC mount root as the data directory.

For PostgreSQL 18+ or to avoid conflicts with PVC metadata (lost+found),
consider enabling the subdirectory pattern in values.yaml:

postgresql:
usePgdataSubdirectory: true

⚠️ WARNING: This is a BREAKING CHANGE for existing deployments.
Enabling this on an existing database will cause data loss unless you
manually migrate first. See CHANGELOG for migration instructions.
{{- end }}
12 changes: 8 additions & 4 deletions helm/optio/templates/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@ spec:
command: ['sh', '-c']
args:
- |
mkdir -p /var/lib/postgresql/data/pgdata
chown -R 999:999 /var/lib/postgresql/data
chmod 700 /var/lib/postgresql/data
{{- if .Values.postgresql.usePgdataSubdirectory }}
mkdir -p /var/lib/postgresql/data/pgdata
chmod 700 /var/lib/postgresql/data/pgdata
chown 999:999 /var/lib/postgresql/data/pgdata
{{- end }}
volumeMounts:
- name: data
mountPath: /var/lib/postgresql/data
Expand Down Expand Up @@ -137,10 +141,10 @@ spec:
secretKeyRef:
name: {{ .Release.Name }}-postgres-credentials
key: POSTGRES_PASSWORD
# Use a subdirectory for PGDATA so initdb doesn't trip over
# filesystem artifacts (e.g. lost+found on ext4 PVs).
# Use a subdirectory for PGDATA if enabled (recommended for PG 18+)
# to avoid filesystem artifacts (e.g. lost+found on ext4 PVs).
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
value: {{ if .Values.postgresql.usePgdataSubdirectory }}/var/lib/postgresql/data/pgdata{{ else }}/var/lib/postgresql/data{{ end }}
ports:
- containerPort: 5432
volumeMounts:
Expand Down
6 changes: 6 additions & 0 deletions helm/optio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ postgresql:
image:
repository: postgres
tag: "16"
# Use PGDATA subdirectory pattern (recommended for PostgreSQL 18+).
# When true, creates /var/lib/postgresql/data/pgdata subdirectory to avoid
# conflicts with PVC metadata (lost+found). Required for fresh PostgreSQL 18+
# deployments. BREAKING: Defaults to false for existing deployments to preserve data.
# Set to true for new installs or after manual migration (see chart NOTES).
usePgdataSubdirectory: false
resources:
requests:
cpu: 100m
Expand Down
Loading