Splits multi-document YAML by ^---\s*$, requires apiVersion + kind string fields per document, emits 1 chunk per recognized k8s resource. Symbol = <kind>/<namespace>/<name> or <kind>/<name> (cluster-scoped). Invalid YAML returns 0 chunks (handled by p10-3 paragraph fallback). Oversize >200 lines splits into line-windows sharing the same symbol. tier2_shared module hosts the oversize fallback + Chunk-construction helper mirroring code_rust_ast_v1's Chunk shape. Task E (dockerfile) and Task F (manifest) will reuse it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
35 lines
530 B
YAML
35 lines
530 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: api-server
|
|
namespace: prod
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: api-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: api-server
|
|
spec:
|
|
containers:
|
|
- name: api
|
|
image: example/api:1.2.3
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: api-server
|
|
namespace: prod
|
|
spec:
|
|
selector:
|
|
app: api-server
|
|
ports:
|
|
- port: 80
|
|
targetPort: 8080
|
|
---
|
|
# Non-k8s document — apiVersion missing
|
|
kind: ClusterIP
|
|
foo: bar
|