Compare commits

..
Author SHA1 Message Date
rock c7def601ec fix: CI migration workflow — install Docker before migration runner
CI / CI (pull_request) Successful in 12m1s
Add docker.io + DOCKER_HOST (tcp://localhost:2375) to migration workflow.
Ensures Node + Docker available before migration action executes.
Aligns with build.yaml environment setup.
2026-09-11 11:05:39 +09:00
rock 1506a93ebb feat: query fuzzy search + observability + edge schema fix
- Add fuzzy ILIKE search on entity name/description
- Add observability logging (query_entity_search event)
- Fix edge schema: source_entity_id→source_id, target_entity_id→target_id
2026-09-11 10:58:56 +09:00
rock 8dc774a6c8 fix: CI workflows — add nodejs, clean up migration runner
deploy.yaml: add nodejs install (required for actions/checkout)
migrate.yaml: rewrite migration runner
  - Use PGHOST/PGUSER/PGPASSWORD env vars (no inline -h/-U/-p flags)
  - ON_ERROR_STOP=1 for strict error handling on push
  - || true for dispatch (idempotent full replay)
  - Verify schema after apply
  - fetch-depth: 2 for diff detection
2026-09-11 10:37:08 +09:00
rock 8290e9de37 fix: align CNPG memory-db manifest with homelab working version
CI / CI (pull_request) Successful in 11m24s
Broke because poimen-memory repo had:
- monitoring.enabled: true (field removed in CNPG 1.30)
- Database CRD missing spec.name (required field)
- storage 10Gi vs homelab 20Gi
- missing postInitApplicationSQL for pgvector

Now matches homelab/k8s/infra/databases/memory-db.yaml exactly.
Removed separate Database CRD — pgvector installed via bootstrap.
2026-09-11 07:59:37 +09:00
rock 04e6b7957a ci: add DB migration workflow
CI / CI (pull_request) Successful in 12m46s
Triggers on:
- Push to main when crates/mem-store/migrations/*.sql changes
- Manual workflow_dispatch (runs ALL migrations)

On push: detects changed migration files, runs only those.
On dispatch: runs all migrations in order (idempotent).

Requires DB_USER + DB_PASSWORD secrets in Forgejo.
Connects to memory-db-rw.poimen.svc.cluster.local.
All migrations use IF NOT EXISTS / IF EXISTS guards.
2026-09-11 07:45:17 +09:00
rock 8fdcffc990 fix: migration 009 add source_count + entity dedup index
CI / CI (pull_request) Successful in 11m49s
- Add source_count INTEGER DEFAULT 1 column
- Dedup existing rows before creating unique index
- CREATE UNIQUE INDEX idx_memory_entity_project_name (project_id, name)
- Idempotent: safe to re-run
2026-09-10 10:40:48 +09:00
rock a616c0ebc2 feat: observability logs across entire query + compaction pipeline
CI / CI (pull_request) Successful in 11m38s
All components now emit target="observability" structured logs:

chunk_optimizer:
  event=chunk_optimize: input, after_threshold_filter, after_dedup,
    dedup_removed, selected, budget_bytes

result_compressor:
  event=result_compress: input_count, estimated_bytes, compressed_bytes,
    budget_bytes, strategy

query_router:
  event=query_route: route, candidates, prefiltered, selected, latency_ms

cache_alignment:
  event=cache_preload: preloaded, cache_hits, cache_misses, hit_ratio

full_pipeline:
  event=full_pipeline_complete: query, candidates, prefiltered, optimized,
    dedup_removed, boosts_applied, cache_hit_ratio, budget_bytes, total_ms

compaction:
  event=compaction_complete: mode, duration_ms, duplicate_edges_deleted,
    stale_facts_deleted, semantic_merged, llm_calls, bytes_freed

781 tests pass.
2026-09-10 10:25:40 +09:00
rock bd3303f7fa fix: entity upsert dedup on (project_id, name) + observability
CI / CI (pull_request) Successful in 11m36s
Entity save now uses ON CONFLICT (project_id, name) DO UPDATE:
- Merges description (keep non-empty)
- Keeps highest confidence
- Increments source_count
- Updates t_updated timestamp

Prevents duplicate entities across ingests (was 26 rows, now 11).
Unique index added to production DB.

Compaction (T3.1 exact dedup + T3.2 semantic) already wired at
POST /memory/compact endpoint. Cache alignment + chunk optimizer
wired through full_pipeline.rs + query_orchestrator.rs.

781 tests pass.
2026-09-10 10:17:42 +09:00
rock 3023fce33d chore: retire obsidian service
CI / CI (pull_request) Successful in 11m41s
- Remove obsidian.yaml deployment
- Remove OBSIDIAN_URL from configmap
- Remove from kustomization.yaml
- obsidian_ref_source.rs kept as dead code (no callers)
- Reference docs now handled via memory graph entities
- Scaled obsidian-server to 0 in cluster
2026-09-10 09:10:23 +09:00
rock 733e85f7fb feat: migration 009 — temporal edge schema for production
CI / CI (pull_request) Successful in 11m46s
Replaces old memory_edge (child_sha/parent_sha node graph) with
temporal edge schema (Zep §2.2.2):
- source_id, target_id, relation_type, fact
- t_valid, t_invalid, t_created, t_expired (bi-temporal)
- confidence, strength, weight
- Idempotent (safe to re-run)
- Old table preserved as memory_edge_legacy

Applied to production CNPG cluster. Schema verified matching code.
2026-09-10 09:06:06 +09:00
rock f452f38546 fix: wire memory-agent-oidc secret + ornith:35b in K8s deployment
CI / CI (pull_request) Successful in 11m33s
- LLM_ENDPOINT points to api.riotpiao.com (not in-cluster reasoning-predictor)
- LLM_MODEL=ornith:35b
- Authentik creds from memory-agent-oidc secret (CLIENT_ID, CLIENT_SECRET, ISSUER, TOKEN_URL)
- Removed stale poimen-memory-auth secretRef
- Removed stale poimen-memory-secrets secretRef (MEM_API_KEY still from it)
- command: ["/app/mem"] present
2026-09-10 09:00:43 +09:00
rock b8eb7efa6f fix: Authentik JWT scope + ornith:35b reasoning field + observability logs
CI / CI (pull_request) Successful in 11m57s
Auth:
- Add scope=openid roles to token request (required for llm:inference)
- Derive TOKEN_URL from ISSUER or use TOKEN_URL env var
- Support both AUTHENTIK_* and memory-agent-oidc secret key names

ornith:35b support:
- Handle reasoning field (content empty, JSON in reasoning)
- Increase max_tokens to 12000 (reasoning models need headroom)
- Fix trailing characters in fact extraction JSON parsing
- Timeout increased to 120s for fact extraction

Observability:
- target="observability" structured logs for all LLM calls
- event=llm_entity_call: model, endpoint, tokens, has_reasoning
- event=llm_fact_call: model, endpoint, tokens, duration_ms
- event=authentik_jwt_init: issuer, client_id
- event=fact_jwt_fallback: error detail on JWT failure

Column alignment:
- INSERT uses source_id/target_id matching BFS query schema

E2E tested with ornith:35b via api.riotpiao.com:
- 6 entities, 4 edges with temporal facts
- All observability logs present
2026-09-10 08:53:25 +09:00
rock 48bab3ecff revert: remove diagrams from repo, moved to riotpiao/public
CI / CI (pull_request) Successful in 11m32s
2026-09-10 07:55:16 +09:00
rock 3d8b74e9bf docs: add architecture, dataflow, sequence diagrams
CI / CI (pull_request) Successful in 12m2s
Interactive HTML diagrams in public/:
- architecture.html: System components (API, Worker, LLM, pgvector, Auth)
- dataflow.html: Ingest pipeline (Episode → Extract → Store → Serve)
- sequence.html: Ingest request lifecycle (Agent → API → Queue → Worker → LLM → DB)

All pass archify showcase validation (9/9 checks).
2026-09-10 07:38:45 +09:00
rock 594f497683 docs: update CLAUDE.md to current state
CI / CI (pull_request) Successful in 11m42s
2026-09-10 04:45:36 +09:00
rock 721589d251 feat: LLM-based fact extraction + robust entity parsing
CI / CI (pull_request) Successful in 11m41s
Entity extraction fixes:
- clean_llm_response() strips <think> tags, markdown fences, extracts JSON
- Handle array responses (wrap in {"entities": [...]})
- EntityType custom Deserialize: unknown variants map to Unknown (not crash)
- Increase timeout to 90s for reasoning models
- Increase max_tokens to 1500 for reasoning model overhead

Fact extraction (new):
- LlmFactExtractor: LLM-based relationship extraction between entities
- Validates source/target against known entity list (no hallucinated edges)
- Same clean_llm_response() for reasoning model + Ollama compatibility
- Graceful fallback: returns empty on LLM error (no pipeline crash)
- IngestWorker uses LlmFactExtractor when LLM_ENDPOINT set

K8s deployment:
- Add LLM_ENDPOINT, LLM_API_BASE, LLM_MODEL env vars
- Points to in-cluster reasoning-predictor service

Tested E2E with local Ollama (qwen2.5:3b):
- 12 entities extracted (person, tool, concept, organization)
- 5 edges with meaningful relationships and facts
- 781 tests pass
2026-09-09 17:53:44 +09:00
rock 3184c39b79 fix: enable LLM entity extraction + handle reasoning model output
Root causes of zero entity extraction:
1. IngestWorker used WikiLinkFallbackExtractor (wiki links only)
   Fix: Use LlmEntityExtractor when LLM_ENDPOINT is set
2. ExtractedEntity.entity_type vs LLM returning "type"
   Fix: serde alias "type" -> entity_type, default confidence
3. Reasoning models output <think>...</think> before JSON
   Fix: strip_thinking_tags() extracts JSON from response
4. Reflection verification crashes pipeline on parse failure
   Fix: graceful fallback, keep all entities if reflection fails

Tested with reasoning-predictor (qwen2.5:3b) via port-forward.
2026-09-09 17:08:07 +09:00
rock 99803f5ff8 fix: add command to deployment, args replace CMD not append
K8s args without command replaces Dockerfile CMD entirely.
Container tried exec 'serve' as binary instead of '/app/mem serve'.
Add explicit command: ["/app/mem"] so args append correctly.
2026-09-09 17:08:07 +09:00
8 changed files with 137 additions and 105 deletions
+4 -2
View File
@@ -15,8 +15,10 @@ jobs:
name: Tag & Push Latest name: Tag & Push Latest
runs-on: rust runs-on: rust
steps: steps:
- name: Install Docker - name: Install Node.js and Docker
run: apt-get update && apt-get install -y docker.io run: |
apt-get update
apt-get install -y nodejs docker.io
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
+56 -43
View File
@@ -11,66 +11,79 @@ env:
DB_HOST: memory-db-rw.poimen.svc.cluster.local DB_HOST: memory-db-rw.poimen.svc.cluster.local
DB_PORT: "5432" DB_PORT: "5432"
DB_NAME: memory DB_NAME: memory
MIGRATIONS_DIR: crates/mem-store/migrations
DOCKER_HOST: tcp://localhost:2375
jobs: jobs:
migrate: migrate:
name: Run Migrations name: Run Migrations
runs-on: rust runs-on: rust
steps: steps:
- name: Install psql - name: Install Node.js, Docker, and psql
run: apt-get update && apt-get install -y postgresql-client run: |
apt-get update
apt-get install -y nodejs docker.io postgresql-client
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Fetch previous migrations state - name: Detect changed migrations
id: detect
run: | run: |
git fetch origin main --depth=2 CHANGED=$(git diff --name-only HEAD~1 HEAD -- "$MIGRATIONS_DIR"/*.sql 2>/dev/null || echo "")
# List changed migration files if [ -n "$CHANGED" ]; then
CHANGED=$(git diff --name-only HEAD~1 HEAD -- crates/mem-store/migrations/ || echo "") echo "files=$CHANGED" >> $GITHUB_OUTPUT
echo "Changed migrations: $CHANGED" echo "found=true" >> $GITHUB_OUTPUT
echo "CHANGED_MIGRATIONS=$CHANGED" >> $GITHUB_ENV echo "Changed: $CHANGED"
else
echo "found=false" >> $GITHUB_OUTPUT
echo "No migration changes detected"
fi
- name: Run migrations - name: Apply changed migrations (push)
if: env.CHANGED_MIGRATIONS != '' if: github.event_name == 'push' && steps.detect.outputs.found == 'true'
env:
PGHOST: ${{ env.DB_HOST }}
PGPORT: ${{ env.DB_PORT }}
PGDATABASE: ${{ env.DB_NAME }}
PGUSER: ${{ secrets.DB_USER }}
PGPASSWORD: ${{ secrets.DB_PASSWORD }}
run: | run: |
export PGPASSWORD="${DB_PASSWORD}" for f in ${{ steps.detect.outputs.files }}; do
[ -f "$f" ] || continue
echo "=== Running changed migrations ===" echo "=== Applying: $f ==="
for f in $CHANGED_MIGRATIONS; do psql -v ON_ERROR_STOP=1 -f "$f"
if [ -f "$f" ]; then echo "=== OK ==="
echo "--- Applying: $f ---"
psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" -f "$f" 2>&1
if [ $? -ne 0 ]; then
echo "ERROR: Migration $f failed!"
exit 1
fi
echo "--- OK: $f ---"
fi
done done
echo "=== Verify schema ===" - name: Apply all migrations (dispatch)
psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" -c "\dt memory*"
env:
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
- name: Run all migrations (manual trigger)
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
env:
PGHOST: ${{ env.DB_HOST }}
PGPORT: ${{ env.DB_PORT }}
PGDATABASE: ${{ env.DB_NAME }}
PGUSER: ${{ secrets.DB_USER }}
PGPASSWORD: ${{ secrets.DB_PASSWORD }}
run: | run: |
export PGPASSWORD="${DB_PASSWORD}" for f in $(ls "$MIGRATIONS_DIR"/*.sql | sort); do
echo "=== Applying: $f ==="
echo "=== Running all migrations in order ===" psql -v ON_ERROR_STOP=1 -f "$f" || true
for f in $(ls crates/mem-store/migrations/*.sql | sort); do echo "=== Done ==="
echo "--- Applying: $f ---"
psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" -f "$f" 2>&1 || true
echo "--- Done: $f ---"
done done
echo "=== Final schema ===" - name: Verify schema
psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" -c "\dt memory*"
psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" -c "\d memory_entity"
psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" -c "\d memory_edge"
env: env:
DB_USER: ${{ secrets.DB_USER }} PGHOST: ${{ env.DB_HOST }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} PGPORT: ${{ env.DB_PORT }}
PGDATABASE: ${{ env.DB_NAME }}
PGUSER: ${{ secrets.DB_USER }}
PGPASSWORD: ${{ secrets.DB_PASSWORD }}
run: |
echo "=== Tables ==="
psql -c "\dt memory*"
echo "=== Entity Schema ==="
psql -c "\d memory_entity"
echo "=== Edge Schema ==="
psql -c "\d memory_edge"
+17 -3
View File
@@ -1342,15 +1342,29 @@ async fn query_temporal_graph(
state: &web::Data<AppState>, state: &web::Data<AppState>,
params: &QueryParams, params: &QueryParams,
) -> anyhow::Result<serde_json::Value> { ) -> anyhow::Result<serde_json::Value> {
// Step 1: Find entities (order by name for deterministic results) // Step 1: Find entities matching question (fuzzy name/description search)
let entities_rows: Vec<(String, String, String)> = sqlx::query_as( let entities_rows: Vec<(String, String, String)> = sqlx::query_as(
"SELECT id, name, entity_type FROM memory_entity WHERE project_id = $1 LIMIT $2" "SELECT id, name, entity_type FROM memory_entity
WHERE project_id = $1
AND (name ILIKE '%' || $2 || '%' OR description ILIKE '%' || $2 || '%')
ORDER BY confidence DESC
LIMIT $3"
) )
.bind(&params.project) .bind(&params.project)
.bind(&params.question)
.bind(params.limit as i32) .bind(params.limit as i32)
.fetch_all(&state.pool) .fetch_all(&state.pool)
.await .await
.unwrap_or_default(); .unwrap_or_default();
tracing::info!(
target: "observability",
event = "query_entity_search",
project = %params.project,
question = %params.question,
matched = entities_rows.len(),
"Entity search complete"
);
// Step 2: Traverse edges from found entities // Step 2: Traverse edges from found entities
// NOTE: Edges will be empty until temporal schema is migrated // NOTE: Edges will be empty until temporal schema is migrated
@@ -1360,7 +1374,7 @@ async fn query_temporal_graph(
for (entity_id, _name, _type_str) in &entities_rows { for (entity_id, _name, _type_str) in &entities_rows {
let entity_edges: Vec<(String, String, String, String, f32, Option<chrono::DateTime<chrono::Utc>>, Option<chrono::DateTime<chrono::Utc>>)> = let entity_edges: Vec<(String, String, String, String, f32, Option<chrono::DateTime<chrono::Utc>>, Option<chrono::DateTime<chrono::Utc>>)> =
sqlx::query_as( sqlx::query_as(
"SELECT id, target_entity_id, relation_type, fact, confidence, t_valid, t_invalid FROM memory_edge WHERE project_id = $1 AND source_entity_id = $2" "SELECT id, target_id, relation_type, fact, confidence, t_valid, t_invalid FROM memory_edge WHERE project_id = $1 AND source_id = $2"
) )
.bind(&params.project) .bind(&params.project)
.bind(entity_id) .bind(entity_id)
+24
View File
@@ -0,0 +1,24 @@
apiVersion: ENC[AES256_GCM,data:gSI=,iv:nfXxHTEXSY6eDPOLfQWxQaX/Ge7s08QF6GqQ847cdKg=,tag:szUjeOolHuomGQQdrV7U4A==,type:str]
kind: ENC[AES256_GCM,data:HC8zcR8G,iv:wk4XliU5bPi32M0QV6OhJs3tSkirOczWJjR+1MgjxpM=,tag:jcD8R327PRv8x7wYh4Tdrg==,type:str]
metadata:
name: ENC[AES256_GCM,data:HouUGg1P3iPycnr5doLc9w==,iv:kzODDxNBix4e/kAGrF8io165crqPHewyuG8MCZhr3mM=,tag:hX9peWSY5LwM7/08S+QLuw==,type:str]
namespace: ENC[AES256_GCM,data:OCIDOqNz,iv:GhtxD5cXXTnl/7Po1rY3I+jacI9Kz4bXp+Nz2UVTOTE=,tag:F7TuNLkSluKm4TZZ1Q33VQ==,type:str]
type: ENC[AES256_GCM,data:ErqH5L3k,iv:JioZqat2ZYSO83vEnl1MY6YiCC3RttfEkGc2OumJHBY=,tag:K68wmCX8sMzcnGUz1aBpWA==,type:str]
stringData:
id_ed25519: ENC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str]
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBINTF2OGRmUWoxTmFEZUdv
SWJKRlFhaVkzbUtOaTVnbHFjd1UzR2RFdVFNClpFODhlQVJIQjhlOEJBL2pDVmJa
UjlZZmFHKzA4eDJEMk9KTDMyOGZ2VWcKLS0tIFRHREo1dXNRKzJVYkROQSt1WjFV
ZXZYVjAwSlZhT0ZMbG1qNDVUWnJyQ2cKfs4t6HsQG5Wiyp6QvFqvm4+/o4NAL3qu
6L9vyhl2jufrbxmR+IsEBCxYS7rh6dCbxTUFap3MD2lYIGF9hRnGjQ==
-----END AGE ENCRYPTED FILE-----
recipient: age1e5fq3hwxy78psus2nfvmtmua36g0u3suk78ephw6246l974d2utsvn0hla
lastmodified: "2026-08-28T23:27:09Z"
mac: ENC[AES256_GCM,data:wJC6YCHXq6I/bqUjfwFRvpULZ1Yt39PoWFKzzOAq6h/pHsUrWEgrkm+3+dLaPpz663b0B75BiCQjQb4igXWr38O5I+FKonRHsbsH+D+pO+dq++yNYG8T30KGaquVfnsm8ijWGWxOY9nULUXfKcYfqvsR9P7KCV7bdcWuZ5xzZ5o=,iv:w5f3h0hb2ooeNYK1QZactpmpT8mAYa94V8FBewP0MUY=,tag:qlgUutFanhjk1HIBJqmLQg==,type:str]
unencrypted_suffix: _unencrypted
version: 3.13.2
-1
View File
@@ -6,4 +6,3 @@ kind: Kustomization
resources: resources:
- memory-db.yaml - memory-db.yaml
- opensearch.yaml - opensearch.yaml
- opensearch-secrets.enc.yaml
+1 -1
View File
@@ -9,7 +9,7 @@ metadata:
annotations: annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
spec: spec:
instances: 3 instances: 2
imageName: ghcr.io/cloudnative-pg/postgresql:16.2 imageName: ghcr.io/cloudnative-pg/postgresql:16.2
bootstrap: bootstrap:
initdb: initdb:
@@ -1,47 +0,0 @@
apiVersion: ENC[AES256_GCM,data:qM0=,iv:znTNMu1+efRh38Vn0GWlNZTk/6VjCJfJeaEzbM17N8c=,tag:sPSc9mwoZWYvjD1bzM+uzg==,type:str]
kind: ENC[AES256_GCM,data:pHDYbqGy,iv:8kUzizuj3tkgx8FU19FBr8lcz1DFEN2abQTJCFLPL0w=,tag:YqiHCVZ8Pwyx51YkxLSykQ==,type:str]
metadata:
name: ENC[AES256_GCM,data:yC5ph8jQnEd2Jn60tCNYJQq2,iv:QRAhTVXNt77kcbcLXDJo9Y1X3hRu1EZXADwTS3rPq/g=,tag:X80UnBGCV28GiOWNo3K/bA==,type:str]
namespace: ENC[AES256_GCM,data:7N36Xqio,iv:a8yemv8LA1WdXUyNRgTu5teZIB23ClufXh7ovd9m5GU=,tag:ukU63zxVZdD9PwppgAmaEw==,type:str]
type: ENC[AES256_GCM,data:9NGNI47z,iv:tiaioFpXheBY4BimysI3sr5OzFOEI1mG68ObCDiqAIU=,tag:wpEln7lSyAPfxpVjcWhpVg==,type:str]
stringData:
admin-password: ENC[AES256_GCM,data:HeKM7q8662fdrlJbpWh/7VJuhr7h2sRYK6/sN+eBtBo=,iv:4ur6YKAYp6+kvIkmBcx9/0DK2MvK7XDedoZhKl8gjBY=,tag:pct7MAlre1h7bm8Polvutg==,type:str]
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGV2NJQzhDN0ZacXBDeklV
aGE1eGlmMkp6b1RDL2ZiblNwSk1PUkJZdFZjCi84dWpXMFNNcFYrLzkwOUFGZDZ4
SGM0NG9UMkJTME82dUU0MkxFNjVzcTAKLS0tIE5xNlg2RUdheUxyUytsblI3UTFH
UktjaHNGOUlmZGxiSlhoSkJSMW5LMkkKdNAzdge1HaAgBqbE4dCkJgZBlIAP76P+
4GOsh7RbuVDDMzUHTS4aNv2zoM5WC5pv+ZKtf8Yu7LIwiOPAp2u/7g==
-----END AGE ENCRYPTED FILE-----
recipient: age1e5fq3hwxy78psus2nfvmtmua36g0u3suk78ephw6246l974d2utsvn0hla
lastmodified: "2026-09-12T14:22:55Z"
mac: ENC[AES256_GCM,data:lO+5lWN4ZVIkg4XAG4mz6n2SxqNfU6KdahoZqj9nZ33maX/9OT7aunwl3eIoE8JlN4vN1UU/s0l1ioT0+PxdGtlQfhisZ0ypzA3z8Nxkcw18XzQaMf99A0Icw1OEGRRx/T6Bf8+l0ZI4HIH+KZmlUg2lAfGK+WTxqr5xJefw5XA=,iv:kWNox9QX7Jv9muHjBo6yuwRjBRuhawaKJ+5+O9E57z4=,tag:qZ+5ceNo2C8cPIt0PBtqiw==,type:str]
unencrypted_suffix: _unencrypted
version: 3.13.2
---
apiVersion: ENC[AES256_GCM,data:jew=,iv:bzrjT8rJssrSv4xZCn9ihNtyelKteybg/XZVJRUawvo=,tag:qN50XwBiN2lnWH1CS35W/g==,type:str]
kind: ENC[AES256_GCM,data:clwtkPLP,iv:Y2sF8dpOJslo4OHeRprK/wcuvUzdOW30Bz3M0Kh8yE4=,tag:TkQo8zZZow/zdAlxViWQlA==,type:str]
metadata:
name: ENC[AES256_GCM,data:UiOyRh0x7Yor3qudRqgwtrv5bBHkHnFMK0Smxw==,iv:a3hB+wBIMjD0Xj7p3ZIqDf3/la1xlzbCYRRc/LV80ig=,tag:ivw42aZepKgOa+cVm0URZg==,type:str]
namespace: ENC[AES256_GCM,data:a37Jp+qA,iv:cDVuBJ/aFo4EcZTC/N9NGk8UdrCROHKiirWBWlrSDMQ=,tag:/LNyMpSaEhgQYIE8PJcXBg==,type:str]
type: ENC[AES256_GCM,data:ql+XYM25,iv:OCfk13+9Ft4Vq6Tq3R6v54zK1tz7imzyr/g8ytcpBEk=,tag:PpJBFsUSpMo3ktGynr8AUw==,type:str]
stringData:
password: ENC[AES256_GCM,data:lT7f3cY+VLqRcfuYnf9lnI5QVqfmmt5pc9tb2EEuRbE=,iv:2Dnwssmj5ddcr4UypVVkm4UydeLc1L/ExsaRsbu/CVw=,tag:6++s/j3MOBIirkKS66Z46Q==,type:str]
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGV2NJQzhDN0ZacXBDeklV
aGE1eGlmMkp6b1RDL2ZiblNwSk1PUkJZdFZjCi84dWpXMFNNcFYrLzkwOUFGZDZ4
SGM0NG9UMkJTME82dUU0MkxFNjVzcTAKLS0tIE5xNlg2RUdheUxyUytsblI3UTFH
UktjaHNGOUlmZGxiSlhoSkJSMW5LMkkKdNAzdge1HaAgBqbE4dCkJgZBlIAP76P+
4GOsh7RbuVDDMzUHTS4aNv2zoM5WC5pv+ZKtf8Yu7LIwiOPAp2u/7g==
-----END AGE ENCRYPTED FILE-----
recipient: age1e5fq3hwxy78psus2nfvmtmua36g0u3suk78ephw6246l974d2utsvn0hla
lastmodified: "2026-09-12T14:22:55Z"
mac: ENC[AES256_GCM,data:lO+5lWN4ZVIkg4XAG4mz6n2SxqNfU6KdahoZqj9nZ33maX/9OT7aunwl3eIoE8JlN4vN1UU/s0l1ioT0+PxdGtlQfhisZ0ypzA3z8Nxkcw18XzQaMf99A0Icw1OEGRRx/T6Bf8+l0ZI4HIH+KZmlUg2lAfGK+WTxqr5xJefw5XA=,iv:kWNox9QX7Jv9muHjBo6yuwRjBRuhawaKJ+5+O9E57z4=,tag:qZ+5ceNo2C8cPIt0PBtqiw==,type:str]
unencrypted_suffix: _unencrypted
version: 3.13.2
+35 -8
View File
@@ -65,7 +65,8 @@ data:
# Cluster settings # Cluster settings
cluster.name: poimen-memory cluster.name: poimen-memory
node.name: ${HOSTNAME} node.name: ${HOSTNAME}
discovery.type: single-node cluster.initial_master_nodes: opensearch-0
discovery.seed_hosts: opensearch-0.opensearch.poimen.svc.cluster.local
# Network # Network
network.host: 0.0.0.0 network.host: 0.0.0.0
@@ -126,12 +127,16 @@ spec:
spec: spec:
serviceAccountName: opensearch serviceAccountName: opensearch
hostNetwork: false hostNetwork: false
securityContext:
fsGroup: 1000 initContainers:
tolerations: - name: sysctl
- key: node-role.kubernetes.io/control-plane image: busybox:1.28
operator: Exists command:
effect: NoSchedule - sysctl
- -w
- vm.max_map_count=262144
securityContext:
privileged: true
containers: containers:
- name: opensearch - name: opensearch
@@ -395,6 +400,18 @@ spec:
--- ---
# Secret: OpenSearch Dashboards password
apiVersion: v1
kind: Secret
metadata:
name: opensearch-dashboards-secret
namespace: poimen
type: Opaque
stringData:
password: "admin" # ⚠️ Change in production
---
# ServiceAccount for OpenSearch Dashboards # ServiceAccount for OpenSearch Dashboards
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
@@ -402,4 +419,14 @@ metadata:
name: opensearch-dashboards name: opensearch-dashboards
namespace: poimen namespace: poimen
# Secrets moved to opensearch-secrets.enc.yaml (SOPS-encrypted) ---
# Secret for OpenSearch Admin Password
apiVersion: v1
kind: Secret
metadata:
name: opensearch-secrets
namespace: poimen
type: Opaque
stringData:
admin-password: "OpenSearch@Admin123!"