@pleri/olam-cli 0.1.147 → 0.1.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-stream/agent-sdk-to-chunks.js +276 -0
- package/dist/agent-stream/agent-stream-launch.js +348 -0
- package/dist/agent-stream/chunks-subscriber-transport.js +262 -0
- package/dist/agent-stream/codex-runner.js +188 -0
- package/dist/agent-stream/driver-runner.js +347 -0
- package/dist/agent-stream/operator-subscription.js +179 -0
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.js +26 -1
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +39 -0
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/doctor.d.ts +54 -3
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +348 -6
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +46 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +90 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/kg-build.d.ts +23 -0
- package/dist/commands/kg-build.d.ts.map +1 -1
- package/dist/commands/kg-build.js +104 -2
- package/dist/commands/kg-build.js.map +1 -1
- package/dist/commands/restart.d.ts +18 -0
- package/dist/commands/restart.d.ts.map +1 -0
- package/dist/commands/restart.js +113 -0
- package/dist/commands/restart.js.map +1 -0
- package/dist/commands/services.d.ts +41 -3
- package/dist/commands/services.d.ts.map +1 -1
- package/dist/commands/services.js +221 -13
- package/dist/commands/services.js.map +1 -1
- package/dist/commands/setup-linux-gate.d.ts +26 -0
- package/dist/commands/setup-linux-gate.d.ts.map +1 -0
- package/dist/commands/setup-linux-gate.js +42 -0
- package/dist/commands/setup-linux-gate.js.map +1 -0
- package/dist/commands/setup-metrics.d.ts +26 -0
- package/dist/commands/setup-metrics.d.ts.map +1 -0
- package/dist/commands/setup-metrics.js +57 -0
- package/dist/commands/setup-metrics.js.map +1 -0
- package/dist/commands/setup-phase-5a-skill-source.d.ts +68 -0
- package/dist/commands/setup-phase-5a-skill-source.d.ts.map +1 -0
- package/dist/commands/setup-phase-5a-skill-source.js +196 -0
- package/dist/commands/setup-phase-5a-skill-source.js.map +1 -0
- package/dist/commands/setup-phase-5b-project-sweep.d.ts +38 -0
- package/dist/commands/setup-phase-5b-project-sweep.d.ts.map +1 -0
- package/dist/commands/setup-phase-5b-project-sweep.js +176 -0
- package/dist/commands/setup-phase-5b-project-sweep.js.map +1 -0
- package/dist/commands/setup.d.ts +19 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +22 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skills-10x.d.ts +23 -0
- package/dist/commands/skills-10x.d.ts.map +1 -0
- package/dist/commands/skills-10x.js +308 -0
- package/dist/commands/skills-10x.js.map +1 -0
- package/dist/commands/substrate-audit-log.d.ts +2 -0
- package/dist/commands/substrate-audit-log.d.ts.map +1 -1
- package/dist/commands/substrate-audit-log.js +13 -0
- package/dist/commands/substrate-audit-log.js.map +1 -1
- package/dist/image-digests.json +7 -7
- package/dist/index.js +18102 -15234
- package/dist/index.js.map +1 -1
- package/dist/lib/auth-refresh-kubernetes.d.ts +62 -0
- package/dist/lib/auth-refresh-kubernetes.d.ts.map +1 -0
- package/dist/lib/auth-refresh-kubernetes.js +127 -0
- package/dist/lib/auth-refresh-kubernetes.js.map +1 -0
- package/dist/lib/build-if-stale.d.ts +33 -0
- package/dist/lib/build-if-stale.d.ts.map +1 -0
- package/dist/lib/build-if-stale.js +156 -0
- package/dist/lib/build-if-stale.js.map +1 -0
- package/dist/lib/bundle-freshness.d.ts +57 -0
- package/dist/lib/bundle-freshness.d.ts.map +1 -0
- package/dist/lib/bundle-freshness.js +223 -0
- package/dist/lib/bundle-freshness.js.map +1 -0
- package/dist/lib/bundle-source.d.ts +52 -0
- package/dist/lib/bundle-source.d.ts.map +1 -0
- package/dist/lib/bundle-source.js +83 -0
- package/dist/lib/bundle-source.js.map +1 -0
- package/dist/lib/kubectl-wrap.d.ts +6 -0
- package/dist/lib/kubectl-wrap.d.ts.map +1 -1
- package/dist/lib/kubectl-wrap.js +6 -1
- package/dist/lib/kubectl-wrap.js.map +1 -1
- package/dist/lib/manifest-refresh.d.ts +42 -1
- package/dist/lib/manifest-refresh.d.ts.map +1 -1
- package/dist/lib/manifest-refresh.js +83 -7
- package/dist/lib/manifest-refresh.js.map +1 -1
- package/dist/lib/peripheral-registry.d.ts +36 -0
- package/dist/lib/peripheral-registry.d.ts.map +1 -0
- package/dist/lib/peripheral-registry.js +55 -0
- package/dist/lib/peripheral-registry.js.map +1 -0
- package/dist/lib/port-forward.d.ts +67 -0
- package/dist/lib/port-forward.d.ts.map +1 -1
- package/dist/lib/port-forward.js +153 -0
- package/dist/lib/port-forward.js.map +1 -1
- package/dist/lib/upgrade-kubernetes.d.ts +52 -12
- package/dist/lib/upgrade-kubernetes.d.ts.map +1 -1
- package/dist/lib/upgrade-kubernetes.js +390 -22
- package/dist/lib/upgrade-kubernetes.js.map +1 -1
- package/dist/mcp-server.js +84 -58
- package/host-cp/compose.yaml +6 -0
- package/host-cp/k8s/manifests/30-configmap.yaml +6 -0
- package/host-cp/k8s/manifests/50-deployment.yaml +46 -9
- package/host-cp/k8s/manifests/auth-service/10-serviceaccount.yaml +8 -0
- package/host-cp/k8s/manifests/auth-service/20-rbac.yaml +34 -0
- package/host-cp/k8s/manifests/auth-service/30-configmap.yaml +24 -0
- package/host-cp/k8s/manifests/auth-service/45-pvc.yaml +25 -0
- package/host-cp/k8s/manifests/auth-service/50-deployment.yaml +117 -0
- package/host-cp/k8s/manifests/auth-service/60-service.yaml +21 -0
- package/host-cp/k8s/manifests/kg-service/10-serviceaccount.yaml +8 -0
- package/host-cp/k8s/manifests/kg-service/20-rbac.yaml +34 -0
- package/host-cp/k8s/manifests/kg-service/30-configmap.yaml +18 -0
- package/host-cp/k8s/manifests/kg-service/45-pvc.yaml +25 -0
- package/host-cp/k8s/manifests/kg-service/50-deployment.yaml +108 -0
- package/host-cp/k8s/manifests/kg-service/60-service.yaml +21 -0
- package/host-cp/k8s/manifests/mcp-auth-service/10-serviceaccount.yaml +8 -0
- package/host-cp/k8s/manifests/mcp-auth-service/20-rbac.yaml +34 -0
- package/host-cp/k8s/manifests/mcp-auth-service/30-configmap.yaml +18 -0
- package/host-cp/k8s/manifests/mcp-auth-service/45-pvc.yaml +25 -0
- package/host-cp/k8s/manifests/mcp-auth-service/50-deployment.yaml +117 -0
- package/host-cp/k8s/manifests/mcp-auth-service/60-service.yaml +21 -0
- package/host-cp/k8s/manifests/memory-service/10-serviceaccount.yaml +8 -0
- package/host-cp/k8s/manifests/memory-service/20-rbac.yaml +34 -0
- package/host-cp/k8s/manifests/memory-service/30-configmap.yaml +20 -0
- package/host-cp/k8s/manifests/memory-service/45-pvc.yaml +25 -0
- package/host-cp/k8s/manifests/memory-service/50-deployment.yaml +121 -0
- package/host-cp/k8s/manifests/memory-service/60-service.yaml +21 -0
- package/host-cp/k8s/templates/auth-service-secret-template.yaml +28 -0
- package/host-cp/k8s/templates/kg-service-secret-template.yaml +28 -0
- package/host-cp/k8s/templates/mcp-auth-service-secret-template.yaml +28 -0
- package/host-cp/k8s/templates/memory-service-secret-template.yaml +29 -0
- package/host-cp/src/agent-runtime-trigger.mjs +7 -5
- package/host-cp/src/plan-chat-secret.mjs +13 -2
- package/host-cp/src/plan-chat-service.mjs +116 -15
- package/host-cp/src/server.mjs +23 -11
- package/host-cp/src/upgrade-spawner.mjs +10 -5
- package/package.json +4 -2
|
@@ -18,20 +18,30 @@
|
|
|
18
18
|
# before the main container starts, granting UID-1000 write access on the
|
|
19
19
|
# freshly-provisioned PV. fsGroup alone is insufficient for hostPath volumes.
|
|
20
20
|
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
21
|
+
# docker-sock (/var/run/docker.sock): hostPath volume — the operator must
|
|
22
|
+
# bind the host docker socket into the k3d node container when creating
|
|
23
|
+
# the cluster (Decision #3 — direct hostPath mount, not docker-socket-proxy):
|
|
24
24
|
#
|
|
25
25
|
# k3d cluster create olam-host \
|
|
26
|
+
# --volume /var/run/docker.sock:/var/run/docker.sock@server:* \
|
|
26
27
|
# --volume ~/.config/gh:/host/.config/gh \
|
|
27
28
|
# --volume <olam-repo-root>:/host/olam \
|
|
28
29
|
# --wait --timeout 90s
|
|
29
30
|
#
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
#
|
|
31
|
+
# An init container (socket-perm) runs `chmod 666 /var/run/docker.sock` as
|
|
32
|
+
# root BEFORE the main container starts. This grants the non-root main
|
|
33
|
+
# container (UID 1000) read+write access to the daemon socket.
|
|
34
|
+
# Deliberate platform-permission concession — see Decision #15:
|
|
35
|
+
# init container as root is the only way to grant non-root main container
|
|
36
|
+
# socket access without bake-time UID alignment on a single-tenant machine.
|
|
37
|
+
#
|
|
38
|
+
# gh-config (/gh-config) and operator-repo (/operator-repo) remain hostPath
|
|
39
|
+
# volumes that resolve to paths inside the k3d node container.
|
|
40
|
+
# OPERATORS MUST pass these volume mounts when creating the k3d cluster (see
|
|
41
|
+
# the k3d command above). Without these flags the gh-config and operator-repo
|
|
42
|
+
# mounts will be empty. The pod will still start — features that depend on
|
|
43
|
+
# GitHub auth or the operator repo will fail gracefully. The Phase D install
|
|
44
|
+
# guide surfaces this requirement prominently.
|
|
35
45
|
apiVersion: apps/v1
|
|
36
46
|
kind: Deployment
|
|
37
47
|
metadata:
|
|
@@ -78,9 +88,26 @@ spec:
|
|
|
78
88
|
volumeMounts:
|
|
79
89
|
- name: olam-home
|
|
80
90
|
mountPath: /data
|
|
91
|
+
- name: socket-perm
|
|
92
|
+
# busybox:1.36 — same sha256-pinned image as chown-data above.
|
|
93
|
+
# Deliberate platform-permission concession — see Decision #15.
|
|
94
|
+
# Runs as root to chmod the docker socket before the non-root main
|
|
95
|
+
# container starts. 666 (world-rw) is intentional on a single-tenant
|
|
96
|
+
# operator machine: UID 1000 must write to a root-owned socket without
|
|
97
|
+
# UID alignment at image build time.
|
|
98
|
+
image: busybox@sha256:73aaf090f3d85aa34ee199857f03fa3a95c8ede2ffd4cc2cdb5b94e566b11662
|
|
99
|
+
imagePullPolicy: IfNotPresent
|
|
100
|
+
securityContext:
|
|
101
|
+
runAsUser: 0
|
|
102
|
+
runAsNonRoot: false
|
|
103
|
+
allowPrivilegeEscalation: false
|
|
104
|
+
command: ["sh", "-c", "chmod 666 /var/run/docker.sock"]
|
|
105
|
+
volumeMounts:
|
|
106
|
+
- name: docker-sock
|
|
107
|
+
mountPath: /var/run/docker.sock
|
|
81
108
|
containers:
|
|
82
109
|
- name: olam-host-cp
|
|
83
|
-
image: ghcr.io/pleri/olam-host-cp@sha256:
|
|
110
|
+
image: ghcr.io/pleri/olam-host-cp@sha256:3256501cfcd2efecd73083d74fa4f12ffe54d4a1842c95f7441d9079102e8bbb
|
|
84
111
|
imagePullPolicy: IfNotPresent
|
|
85
112
|
securityContext:
|
|
86
113
|
runAsNonRoot: true
|
|
@@ -109,6 +136,8 @@ spec:
|
|
|
109
136
|
readOnly: true
|
|
110
137
|
- name: tmp
|
|
111
138
|
mountPath: /tmp
|
|
139
|
+
- name: docker-sock
|
|
140
|
+
mountPath: /var/run/docker.sock
|
|
112
141
|
readinessProbe:
|
|
113
142
|
httpGet:
|
|
114
143
|
path: /api/version/status
|
|
@@ -146,3 +175,11 @@ spec:
|
|
|
146
175
|
type: DirectoryOrCreate
|
|
147
176
|
- name: tmp
|
|
148
177
|
emptyDir: {}
|
|
178
|
+
- name: docker-sock
|
|
179
|
+
# D4 — Direct hostPath docker socket mount (Decision #3, architecture a2).
|
|
180
|
+
# The operator must bind the host docker socket into the k3d node when
|
|
181
|
+
# creating the cluster: --volume /var/run/docker.sock:/var/run/docker.sock@server:*
|
|
182
|
+
# Without this bind-mount the socket path exists inside the node but is empty.
|
|
183
|
+
hostPath:
|
|
184
|
+
path: /var/run/docker.sock
|
|
185
|
+
type: Socket
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Phase 1a Decision 19: Role scoped to resourceNames: ["olam-auth-service"] on
|
|
2
|
+
# apps/v1 deployments. Without this scope, the in-cluster ServiceAccount
|
|
3
|
+
# could patch ANY Deployment in the namespace. This is the load-bearing
|
|
4
|
+
# security guardrail — preserve verbatim.
|
|
5
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
6
|
+
kind: Role
|
|
7
|
+
metadata:
|
|
8
|
+
name: olam-auth-service
|
|
9
|
+
namespace: olam
|
|
10
|
+
labels:
|
|
11
|
+
app: olam-auth-service
|
|
12
|
+
olam.io/component: peripheral
|
|
13
|
+
rules:
|
|
14
|
+
- apiGroups: ["apps"]
|
|
15
|
+
resources: ["deployments"]
|
|
16
|
+
resourceNames: ["olam-auth-service"]
|
|
17
|
+
verbs: ["get", "patch", "watch"]
|
|
18
|
+
---
|
|
19
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
20
|
+
kind: RoleBinding
|
|
21
|
+
metadata:
|
|
22
|
+
name: olam-auth-service
|
|
23
|
+
namespace: olam
|
|
24
|
+
labels:
|
|
25
|
+
app: olam-auth-service
|
|
26
|
+
olam.io/component: peripheral
|
|
27
|
+
subjects:
|
|
28
|
+
- kind: ServiceAccount
|
|
29
|
+
name: olam-auth-service
|
|
30
|
+
namespace: olam
|
|
31
|
+
roleRef:
|
|
32
|
+
kind: Role
|
|
33
|
+
name: olam-auth-service
|
|
34
|
+
apiGroup: rbac.authorization.k8s.io
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ConfigMap for olam-auth-service environment. Sensitive values (AUTH_DB_SECRET,
|
|
2
|
+
# API keys) are NOT here — they live in the Secret (see templates/auth-service-secret-template.yaml).
|
|
3
|
+
# Operators apply the Secret separately before applying the manifests.
|
|
4
|
+
#
|
|
5
|
+
# Inter-peripheral URL placeholders (e.g. OLAM_MCP_AUTH_URL) are set to
|
|
6
|
+
# cluster-internal DNS names. These are resolved by Phase C substitution;
|
|
7
|
+
# operators running Phase 2 Beta may override them directly.
|
|
8
|
+
apiVersion: v1
|
|
9
|
+
kind: ConfigMap
|
|
10
|
+
metadata:
|
|
11
|
+
name: olam-auth-service-env
|
|
12
|
+
namespace: olam
|
|
13
|
+
labels:
|
|
14
|
+
app: olam-auth-service
|
|
15
|
+
olam.io/component: peripheral
|
|
16
|
+
data:
|
|
17
|
+
# Port auth-service listens on. Must match 60-service.yaml targetPort.
|
|
18
|
+
OLAM_AUTH_PORT: "9999"
|
|
19
|
+
# Data directory — backed by the PVC mounted at /data.
|
|
20
|
+
OLAM_AUTH_DATA_PATH: "/data/auth"
|
|
21
|
+
# URL of mcp-auth-service (cluster-internal DNS). Override in non-k3d environments.
|
|
22
|
+
OLAM_MCP_AUTH_SERVICE_URL: "http://olam-mcp-auth-service.olam.svc.cluster.local:9998"
|
|
23
|
+
# Credential vault poll interval.
|
|
24
|
+
OLAM_CREDENTIAL_POLL_MS: "60000"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# PersistentVolumeClaim for olam-auth-service /data volume.
|
|
2
|
+
#
|
|
3
|
+
# Why PVC instead of hostPath: see packages/host-cp/k8s/manifests/host-cp/45-pvc.yaml
|
|
4
|
+
# for the full rationale (fsGroup, k3d node filesystem, etc.).
|
|
5
|
+
#
|
|
6
|
+
# local-path StorageClass ships with k3d by default (rancher/local-path-provisioner).
|
|
7
|
+
# On non-k3d clusters, substitute storageClassName with your cluster's provisioner.
|
|
8
|
+
# D24: storageClassName operator-editable — edit the field below for non-k3d substrates.
|
|
9
|
+
apiVersion: v1
|
|
10
|
+
kind: PersistentVolumeClaim
|
|
11
|
+
metadata:
|
|
12
|
+
name: olam-auth-data
|
|
13
|
+
namespace: olam
|
|
14
|
+
labels:
|
|
15
|
+
app: olam-auth-service
|
|
16
|
+
olam.io/component: peripheral
|
|
17
|
+
spec:
|
|
18
|
+
accessModes:
|
|
19
|
+
- ReadWriteOnce
|
|
20
|
+
# D24: operator-editable. k3d default is local-path. Change for non-k3d substrates.
|
|
21
|
+
storageClassName: local-path
|
|
22
|
+
resources:
|
|
23
|
+
requests:
|
|
24
|
+
# D25: auth-service PVC size 5Gi.
|
|
25
|
+
storage: 5Gi
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Deployment for olam-auth-service.
|
|
2
|
+
#
|
|
3
|
+
# Image: pinned to sha256 digest (not :latest or named tag) per T4 threat model.
|
|
4
|
+
# Digest resolves to ghcr.io/pleri/olam-auth:latest (multi-arch index).
|
|
5
|
+
# NOTE (B1): image name is olam-auth (NOT olam-auth-service) — matches the
|
|
6
|
+
# actual GHCR package name published by release.yml publish-auth job.
|
|
7
|
+
# To update: resolve the new tag's digest via:
|
|
8
|
+
# TOKEN=$(curl -s "https://ghcr.io/token?scope=repository:pleri/olam-auth:pull&service=ghcr.io" | jq -r .token)
|
|
9
|
+
# curl -sI -H "Authorization: Bearer $TOKEN" \
|
|
10
|
+
# -H "Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json" \
|
|
11
|
+
# https://ghcr.io/v2/pleri/olam-auth/manifests/<tag> | grep docker-content-digest
|
|
12
|
+
# Or use: node scripts/refresh-manifest-digests.mjs
|
|
13
|
+
#
|
|
14
|
+
# securityContext: conservative defaults per T6/T7 threat model (runAsNonRoot,
|
|
15
|
+
# readOnlyRootFilesystem). /tmp backed by emptyDir for transient write needs.
|
|
16
|
+
#
|
|
17
|
+
# D17: auth-service does NOT mount /var/run/docker.sock (Phase 2 k8s pods
|
|
18
|
+
# cannot reach docker.sock — no hostPath socket mount).
|
|
19
|
+
#
|
|
20
|
+
# chown-data init container: grants UID-1000 write access on the freshly-
|
|
21
|
+
# provisioned PV (fsGroup alone is insufficient for local-path PVs).
|
|
22
|
+
apiVersion: apps/v1
|
|
23
|
+
kind: Deployment
|
|
24
|
+
metadata:
|
|
25
|
+
name: olam-auth-service
|
|
26
|
+
namespace: olam
|
|
27
|
+
labels:
|
|
28
|
+
app: olam-auth-service
|
|
29
|
+
olam.io/component: peripheral
|
|
30
|
+
spec:
|
|
31
|
+
replicas: 1
|
|
32
|
+
strategy:
|
|
33
|
+
type: RollingUpdate
|
|
34
|
+
rollingUpdate:
|
|
35
|
+
maxSurge: 1
|
|
36
|
+
maxUnavailable: 0
|
|
37
|
+
selector:
|
|
38
|
+
matchLabels:
|
|
39
|
+
app: olam-auth-service
|
|
40
|
+
template:
|
|
41
|
+
metadata:
|
|
42
|
+
labels:
|
|
43
|
+
app: olam-auth-service
|
|
44
|
+
spec:
|
|
45
|
+
serviceAccountName: olam-auth-service
|
|
46
|
+
securityContext:
|
|
47
|
+
runAsNonRoot: true
|
|
48
|
+
runAsUser: 1000
|
|
49
|
+
runAsGroup: 1000
|
|
50
|
+
fsGroup: 1000
|
|
51
|
+
initContainers:
|
|
52
|
+
- name: chown-data
|
|
53
|
+
# busybox:1.36 — sha256-pinned per T4 threat model.
|
|
54
|
+
image: busybox@sha256:73aaf090f3d85aa34ee199857f03fa3a95c8ede2ffd4cc2cdb5b94e566b11662
|
|
55
|
+
imagePullPolicy: IfNotPresent
|
|
56
|
+
securityContext:
|
|
57
|
+
runAsUser: 0
|
|
58
|
+
runAsNonRoot: false
|
|
59
|
+
allowPrivilegeEscalation: false
|
|
60
|
+
command: ["chown", "-R", "1000:1000", "/data"]
|
|
61
|
+
volumeMounts:
|
|
62
|
+
- name: auth-data
|
|
63
|
+
mountPath: /data
|
|
64
|
+
containers:
|
|
65
|
+
- name: olam-auth-service
|
|
66
|
+
image: ghcr.io/pleri/olam-auth@sha256:8530c3ad6719eeadcd141ff04f6d209f57cdc9aff3636afd43e774d7445df8ee
|
|
67
|
+
imagePullPolicy: IfNotPresent
|
|
68
|
+
securityContext:
|
|
69
|
+
runAsNonRoot: true
|
|
70
|
+
runAsUser: 1000
|
|
71
|
+
readOnlyRootFilesystem: true
|
|
72
|
+
allowPrivilegeEscalation: false
|
|
73
|
+
capabilities:
|
|
74
|
+
drop: ["ALL"]
|
|
75
|
+
ports:
|
|
76
|
+
- name: http
|
|
77
|
+
containerPort: 9999
|
|
78
|
+
protocol: TCP
|
|
79
|
+
envFrom:
|
|
80
|
+
- configMapRef:
|
|
81
|
+
name: olam-auth-service-env
|
|
82
|
+
- secretRef:
|
|
83
|
+
name: olam-auth-service-secret
|
|
84
|
+
volumeMounts:
|
|
85
|
+
- name: auth-data
|
|
86
|
+
mountPath: /data
|
|
87
|
+
- name: tmp
|
|
88
|
+
mountPath: /tmp
|
|
89
|
+
readinessProbe:
|
|
90
|
+
httpGet:
|
|
91
|
+
path: /health
|
|
92
|
+
port: 9999
|
|
93
|
+
initialDelaySeconds: 5
|
|
94
|
+
periodSeconds: 5
|
|
95
|
+
timeoutSeconds: 3
|
|
96
|
+
failureThreshold: 6
|
|
97
|
+
livenessProbe:
|
|
98
|
+
httpGet:
|
|
99
|
+
path: /health
|
|
100
|
+
port: 9999
|
|
101
|
+
initialDelaySeconds: 30
|
|
102
|
+
periodSeconds: 20
|
|
103
|
+
timeoutSeconds: 5
|
|
104
|
+
failureThreshold: 3
|
|
105
|
+
resources:
|
|
106
|
+
requests:
|
|
107
|
+
cpu: "50m"
|
|
108
|
+
memory: "128Mi"
|
|
109
|
+
limits:
|
|
110
|
+
cpu: "500m"
|
|
111
|
+
memory: "512Mi"
|
|
112
|
+
volumes:
|
|
113
|
+
- name: auth-data
|
|
114
|
+
persistentVolumeClaim:
|
|
115
|
+
claimName: olam-auth-data
|
|
116
|
+
- name: tmp
|
|
117
|
+
emptyDir: {}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ClusterIP Service for olam-auth-service.
|
|
2
|
+
# Port 9999 — consumed by host-cp and other peripherals via cluster-internal DNS.
|
|
3
|
+
# Operator surfaces externally via:
|
|
4
|
+
# kubectl port-forward -n olam svc/olam-auth-service 9999:9999
|
|
5
|
+
apiVersion: v1
|
|
6
|
+
kind: Service
|
|
7
|
+
metadata:
|
|
8
|
+
name: olam-auth-service
|
|
9
|
+
namespace: olam
|
|
10
|
+
labels:
|
|
11
|
+
app: olam-auth-service
|
|
12
|
+
olam.io/component: peripheral
|
|
13
|
+
spec:
|
|
14
|
+
type: ClusterIP
|
|
15
|
+
selector:
|
|
16
|
+
app: olam-auth-service
|
|
17
|
+
ports:
|
|
18
|
+
- name: http
|
|
19
|
+
port: 9999
|
|
20
|
+
targetPort: 9999
|
|
21
|
+
protocol: TCP
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Phase 1a Decision 19: Role scoped to resourceNames: ["olam-kg-service"] on
|
|
2
|
+
# apps/v1 deployments. Without this scope, the in-cluster ServiceAccount
|
|
3
|
+
# could patch ANY Deployment in the namespace. This is the load-bearing
|
|
4
|
+
# security guardrail — preserve verbatim.
|
|
5
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
6
|
+
kind: Role
|
|
7
|
+
metadata:
|
|
8
|
+
name: olam-kg-service
|
|
9
|
+
namespace: olam
|
|
10
|
+
labels:
|
|
11
|
+
app: olam-kg-service
|
|
12
|
+
olam.io/component: peripheral
|
|
13
|
+
rules:
|
|
14
|
+
- apiGroups: ["apps"]
|
|
15
|
+
resources: ["deployments"]
|
|
16
|
+
resourceNames: ["olam-kg-service"]
|
|
17
|
+
verbs: ["get", "patch", "watch"]
|
|
18
|
+
---
|
|
19
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
20
|
+
kind: RoleBinding
|
|
21
|
+
metadata:
|
|
22
|
+
name: olam-kg-service
|
|
23
|
+
namespace: olam
|
|
24
|
+
labels:
|
|
25
|
+
app: olam-kg-service
|
|
26
|
+
olam.io/component: peripheral
|
|
27
|
+
subjects:
|
|
28
|
+
- kind: ServiceAccount
|
|
29
|
+
name: olam-kg-service
|
|
30
|
+
namespace: olam
|
|
31
|
+
roleRef:
|
|
32
|
+
kind: Role
|
|
33
|
+
name: olam-kg-service
|
|
34
|
+
apiGroup: rbac.authorization.k8s.io
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ConfigMap for olam-kg-service environment. Sensitive values live in
|
|
2
|
+
# the Secret (see templates/kg-service-secret-template.yaml).
|
|
3
|
+
# Operators apply the Secret separately before applying the manifests.
|
|
4
|
+
apiVersion: v1
|
|
5
|
+
kind: ConfigMap
|
|
6
|
+
metadata:
|
|
7
|
+
name: olam-kg-service-env
|
|
8
|
+
namespace: olam
|
|
9
|
+
labels:
|
|
10
|
+
app: olam-kg-service
|
|
11
|
+
olam.io/component: peripheral
|
|
12
|
+
data:
|
|
13
|
+
# Port kg-service listens on. Must match 60-service.yaml targetPort.
|
|
14
|
+
OLAM_KG_PORT: "9997"
|
|
15
|
+
# Data directory — backed by the PVC mounted at /data.
|
|
16
|
+
OLAM_KG_DATA_PATH: "/data/kg"
|
|
17
|
+
# URL of auth-service (cluster-internal DNS). Override in non-k3d environments.
|
|
18
|
+
OLAM_AUTH_SERVICE_URL: "http://olam-auth-service.olam.svc.cluster.local:9999"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# PersistentVolumeClaim for olam-kg-service /data volume.
|
|
2
|
+
#
|
|
3
|
+
# Why PVC instead of hostPath: see packages/host-cp/k8s/manifests/host-cp/45-pvc.yaml
|
|
4
|
+
# for the full rationale (fsGroup, k3d node filesystem, etc.).
|
|
5
|
+
#
|
|
6
|
+
# local-path StorageClass ships with k3d by default (rancher/local-path-provisioner).
|
|
7
|
+
# On non-k3d clusters, substitute storageClassName with your cluster's provisioner.
|
|
8
|
+
# D24: storageClassName operator-editable — edit the field below for non-k3d substrates.
|
|
9
|
+
apiVersion: v1
|
|
10
|
+
kind: PersistentVolumeClaim
|
|
11
|
+
metadata:
|
|
12
|
+
name: olam-kg-data
|
|
13
|
+
namespace: olam
|
|
14
|
+
labels:
|
|
15
|
+
app: olam-kg-service
|
|
16
|
+
olam.io/component: peripheral
|
|
17
|
+
spec:
|
|
18
|
+
accessModes:
|
|
19
|
+
- ReadWriteOnce
|
|
20
|
+
# D24: operator-editable. k3d default is local-path. Change for non-k3d substrates.
|
|
21
|
+
storageClassName: local-path
|
|
22
|
+
resources:
|
|
23
|
+
requests:
|
|
24
|
+
# D25: kg-service PVC size 10Gi (larger: graph index grows with codebase).
|
|
25
|
+
storage: 10Gi
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Deployment for olam-kg-service.
|
|
2
|
+
#
|
|
3
|
+
# Image: pinned to sha256 digest (not :latest or named tag) per T4 threat model.
|
|
4
|
+
# Digest resolves to ghcr.io/pleri/olam-kg-service:0.1.0 (multi-arch index).
|
|
5
|
+
# To update: resolve the new tag's digest via:
|
|
6
|
+
# TOKEN=$(curl -s "https://ghcr.io/token?scope=repository:pleri/olam-kg-service:pull&service=ghcr.io" | jq -r .token)
|
|
7
|
+
# curl -sI -H "Authorization: Bearer $TOKEN" \
|
|
8
|
+
# -H "Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json" \
|
|
9
|
+
# https://ghcr.io/v2/pleri/olam-kg-service/manifests/<tag> | grep docker-content-digest
|
|
10
|
+
#
|
|
11
|
+
# securityContext: conservative defaults per T6/T7 threat model (runAsNonRoot,
|
|
12
|
+
# readOnlyRootFilesystem). /tmp backed by emptyDir for transient write needs.
|
|
13
|
+
apiVersion: apps/v1
|
|
14
|
+
kind: Deployment
|
|
15
|
+
metadata:
|
|
16
|
+
name: olam-kg-service
|
|
17
|
+
namespace: olam
|
|
18
|
+
labels:
|
|
19
|
+
app: olam-kg-service
|
|
20
|
+
olam.io/component: peripheral
|
|
21
|
+
spec:
|
|
22
|
+
replicas: 1
|
|
23
|
+
strategy:
|
|
24
|
+
type: RollingUpdate
|
|
25
|
+
rollingUpdate:
|
|
26
|
+
maxSurge: 1
|
|
27
|
+
maxUnavailable: 0
|
|
28
|
+
selector:
|
|
29
|
+
matchLabels:
|
|
30
|
+
app: olam-kg-service
|
|
31
|
+
template:
|
|
32
|
+
metadata:
|
|
33
|
+
labels:
|
|
34
|
+
app: olam-kg-service
|
|
35
|
+
spec:
|
|
36
|
+
serviceAccountName: olam-kg-service
|
|
37
|
+
securityContext:
|
|
38
|
+
runAsNonRoot: true
|
|
39
|
+
runAsUser: 1000
|
|
40
|
+
runAsGroup: 1000
|
|
41
|
+
fsGroup: 1000
|
|
42
|
+
initContainers:
|
|
43
|
+
- name: chown-data
|
|
44
|
+
# busybox:1.36 — sha256-pinned per T4 threat model.
|
|
45
|
+
image: busybox@sha256:73aaf090f3d85aa34ee199857f03fa3a95c8ede2ffd4cc2cdb5b94e566b11662
|
|
46
|
+
imagePullPolicy: IfNotPresent
|
|
47
|
+
securityContext:
|
|
48
|
+
runAsUser: 0
|
|
49
|
+
runAsNonRoot: false
|
|
50
|
+
allowPrivilegeEscalation: false
|
|
51
|
+
command: ["chown", "-R", "1000:1000", "/data"]
|
|
52
|
+
volumeMounts:
|
|
53
|
+
- name: kg-data
|
|
54
|
+
mountPath: /data
|
|
55
|
+
containers:
|
|
56
|
+
- name: olam-kg-service
|
|
57
|
+
image: ghcr.io/pleri/olam-kg-service@sha256:7e213dcc29d865e1d99b4c92d381fa05dfd66677dce72590c23455a49e1afa4a
|
|
58
|
+
imagePullPolicy: IfNotPresent
|
|
59
|
+
securityContext:
|
|
60
|
+
runAsNonRoot: true
|
|
61
|
+
runAsUser: 1000
|
|
62
|
+
readOnlyRootFilesystem: true
|
|
63
|
+
allowPrivilegeEscalation: false
|
|
64
|
+
capabilities:
|
|
65
|
+
drop: ["ALL"]
|
|
66
|
+
ports:
|
|
67
|
+
- name: http
|
|
68
|
+
containerPort: 9997
|
|
69
|
+
protocol: TCP
|
|
70
|
+
envFrom:
|
|
71
|
+
- configMapRef:
|
|
72
|
+
name: olam-kg-service-env
|
|
73
|
+
- secretRef:
|
|
74
|
+
name: olam-kg-service-secret
|
|
75
|
+
volumeMounts:
|
|
76
|
+
- name: kg-data
|
|
77
|
+
mountPath: /data
|
|
78
|
+
- name: tmp
|
|
79
|
+
mountPath: /tmp
|
|
80
|
+
readinessProbe:
|
|
81
|
+
httpGet:
|
|
82
|
+
path: /health
|
|
83
|
+
port: 9997
|
|
84
|
+
initialDelaySeconds: 5
|
|
85
|
+
periodSeconds: 5
|
|
86
|
+
timeoutSeconds: 3
|
|
87
|
+
failureThreshold: 6
|
|
88
|
+
livenessProbe:
|
|
89
|
+
httpGet:
|
|
90
|
+
path: /health
|
|
91
|
+
port: 9997
|
|
92
|
+
initialDelaySeconds: 30
|
|
93
|
+
periodSeconds: 20
|
|
94
|
+
timeoutSeconds: 5
|
|
95
|
+
failureThreshold: 3
|
|
96
|
+
resources:
|
|
97
|
+
requests:
|
|
98
|
+
cpu: "100m"
|
|
99
|
+
memory: "256Mi"
|
|
100
|
+
limits:
|
|
101
|
+
cpu: "1000m"
|
|
102
|
+
memory: "1Gi"
|
|
103
|
+
volumes:
|
|
104
|
+
- name: kg-data
|
|
105
|
+
persistentVolumeClaim:
|
|
106
|
+
claimName: olam-kg-data
|
|
107
|
+
- name: tmp
|
|
108
|
+
emptyDir: {}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ClusterIP Service for olam-kg-service.
|
|
2
|
+
# Port 9997 — consumed by agents and host-cp via cluster-internal DNS.
|
|
3
|
+
# Operator surfaces externally via:
|
|
4
|
+
# kubectl port-forward -n olam svc/olam-kg-service 9997:9997
|
|
5
|
+
apiVersion: v1
|
|
6
|
+
kind: Service
|
|
7
|
+
metadata:
|
|
8
|
+
name: olam-kg-service
|
|
9
|
+
namespace: olam
|
|
10
|
+
labels:
|
|
11
|
+
app: olam-kg-service
|
|
12
|
+
olam.io/component: peripheral
|
|
13
|
+
spec:
|
|
14
|
+
type: ClusterIP
|
|
15
|
+
selector:
|
|
16
|
+
app: olam-kg-service
|
|
17
|
+
ports:
|
|
18
|
+
- name: http
|
|
19
|
+
port: 9997
|
|
20
|
+
targetPort: 9997
|
|
21
|
+
protocol: TCP
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Phase 1a Decision 19: Role scoped to resourceNames: ["olam-mcp-auth-service"] on
|
|
2
|
+
# apps/v1 deployments. Without this scope, the in-cluster ServiceAccount
|
|
3
|
+
# could patch ANY Deployment in the namespace. This is the load-bearing
|
|
4
|
+
# security guardrail — preserve verbatim.
|
|
5
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
6
|
+
kind: Role
|
|
7
|
+
metadata:
|
|
8
|
+
name: olam-mcp-auth-service
|
|
9
|
+
namespace: olam
|
|
10
|
+
labels:
|
|
11
|
+
app: olam-mcp-auth-service
|
|
12
|
+
olam.io/component: peripheral
|
|
13
|
+
rules:
|
|
14
|
+
- apiGroups: ["apps"]
|
|
15
|
+
resources: ["deployments"]
|
|
16
|
+
resourceNames: ["olam-mcp-auth-service"]
|
|
17
|
+
verbs: ["get", "patch", "watch"]
|
|
18
|
+
---
|
|
19
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
20
|
+
kind: RoleBinding
|
|
21
|
+
metadata:
|
|
22
|
+
name: olam-mcp-auth-service
|
|
23
|
+
namespace: olam
|
|
24
|
+
labels:
|
|
25
|
+
app: olam-mcp-auth-service
|
|
26
|
+
olam.io/component: peripheral
|
|
27
|
+
subjects:
|
|
28
|
+
- kind: ServiceAccount
|
|
29
|
+
name: olam-mcp-auth-service
|
|
30
|
+
namespace: olam
|
|
31
|
+
roleRef:
|
|
32
|
+
kind: Role
|
|
33
|
+
name: olam-mcp-auth-service
|
|
34
|
+
apiGroup: rbac.authorization.k8s.io
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ConfigMap for olam-mcp-auth-service environment. Sensitive values live in
|
|
2
|
+
# the Secret (see templates/mcp-auth-service-secret-template.yaml).
|
|
3
|
+
# Operators apply the Secret separately before applying the manifests.
|
|
4
|
+
apiVersion: v1
|
|
5
|
+
kind: ConfigMap
|
|
6
|
+
metadata:
|
|
7
|
+
name: olam-mcp-auth-service-env
|
|
8
|
+
namespace: olam
|
|
9
|
+
labels:
|
|
10
|
+
app: olam-mcp-auth-service
|
|
11
|
+
olam.io/component: peripheral
|
|
12
|
+
data:
|
|
13
|
+
# Port mcp-auth-service listens on. Must match 60-service.yaml targetPort.
|
|
14
|
+
OLAM_MCP_AUTH_PORT: "9998"
|
|
15
|
+
# Data directory — backed by the PVC mounted at /data.
|
|
16
|
+
OLAM_MCP_AUTH_DATA_PATH: "/data/mcp-auth"
|
|
17
|
+
# URL of auth-service (cluster-internal DNS). Override in non-k3d environments.
|
|
18
|
+
OLAM_AUTH_SERVICE_URL: "http://olam-auth-service.olam.svc.cluster.local:9999"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# PersistentVolumeClaim for olam-mcp-auth-service /data volume.
|
|
2
|
+
#
|
|
3
|
+
# Why PVC instead of hostPath: see packages/host-cp/k8s/manifests/host-cp/45-pvc.yaml
|
|
4
|
+
# for the full rationale (fsGroup, k3d node filesystem, etc.).
|
|
5
|
+
#
|
|
6
|
+
# local-path StorageClass ships with k3d by default (rancher/local-path-provisioner).
|
|
7
|
+
# On non-k3d clusters, substitute storageClassName with your cluster's provisioner.
|
|
8
|
+
# D24: storageClassName operator-editable — edit the field below for non-k3d substrates.
|
|
9
|
+
apiVersion: v1
|
|
10
|
+
kind: PersistentVolumeClaim
|
|
11
|
+
metadata:
|
|
12
|
+
name: olam-mcp-auth-data
|
|
13
|
+
namespace: olam
|
|
14
|
+
labels:
|
|
15
|
+
app: olam-mcp-auth-service
|
|
16
|
+
olam.io/component: peripheral
|
|
17
|
+
spec:
|
|
18
|
+
accessModes:
|
|
19
|
+
- ReadWriteOnce
|
|
20
|
+
# D24: operator-editable. k3d default is local-path. Change for non-k3d substrates.
|
|
21
|
+
storageClassName: local-path
|
|
22
|
+
resources:
|
|
23
|
+
requests:
|
|
24
|
+
# D25: mcp-auth-service PVC size 5Gi.
|
|
25
|
+
storage: 5Gi
|