MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / k8s_patch_edge

Function k8s_patch_edge

src/pipeline/pass_k8s.c:4081–4095  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4079}
4080
4081static void k8s_patch_edge(cbm_pipeline_ctx_t *ctx, int64_t src, int64_t tgt,
4082 const k8s_patch_t *p) {
4083 if (src <= 0 || tgt <= 0 || src == tgt) {
4084 return;
4085 }
4086 char ek[CBM_SZ_2K];
4087 char ep[CBM_SZ_2K];
4088 cbm_json_escape(ek, (int)sizeof(ek), p->kust);
4089 cbm_json_escape(ep, (int)sizeof(ep), p->path ? p->path : "inline");
4090 char props[CBM_SZ_4K + CBM_SZ_1K];
4091 snprintf(props, sizeof(props),
4092 "{\"via\":\"patch\",\"kustomization\":\"%s\",\"patch\":\"%s\",\"line\":%d}", ek, ep,
4093 p->line);
4094 cbm_gbuf_insert_edge(ctx->gbuf, src, tgt, "OVERRIDE", props);
4095}
4096
4097/* The build a patch acts in: its manifests, their Resources by name
4098 * (`names`: "Kind/name" -> ids, this build's only -- a repository-wide name

Callers 1

k8s_patch_targetsFunction · 0.85

Calls 2

cbm_json_escapeFunction · 0.85
cbm_gbuf_insert_edgeFunction · 0.85

Tested by

no test coverage detected