Added resource limits to resources.

This commit is contained in:
Cyber MacGeddon 2024-08-22 17:52:59 +01:00
parent 86cbe7f929
commit f36e8e5acc
16 changed files with 499 additions and 3 deletions

View file

@ -19,6 +19,18 @@ local url = import "url.jsonnet";
"-t", "-t",
"0.0", "0.0",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"text-completion-rag": base + { "text-completion-rag": base + {
@ -40,6 +52,18 @@ local url = import "url.jsonnet";
"-o", "-o",
"non-persistent://tg/response/text-completion-rag-response", "non-persistent://tg/response/text-completion-rag-response",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
}, },

View file

@ -15,6 +15,18 @@ local url = import "url.jsonnet";
"--chunk-overlap", "--chunk-overlap",
"100", "100",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"text-completion": base + { "text-completion": base + {
@ -36,6 +48,18 @@ local url = import "url.jsonnet";
"-m", "-m",
"mistral.mixtral-8x7b-instruct-v0:1", "mistral.mixtral-8x7b-instruct-v0:1",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"text-completion-rag": base + { "text-completion-rag": base + {
@ -63,6 +87,18 @@ local url = import "url.jsonnet";
"-o", "-o",
"non-persistent://tg/response/text-completion-rag-response", "non-persistent://tg/response/text-completion-rag-response",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
}, },

View file

@ -17,6 +17,18 @@ cassandra + {
"-g", "-g",
cassandra_hosts, cassandra_hosts,
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"query-triples": base + { "query-triples": base + {
@ -28,6 +40,18 @@ cassandra + {
"-g", "-g",
cassandra_hosts, cassandra_hosts,
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '512M'
},
reservations: {
cpus: '0.1',
memory: '512M'
}
}
},
}, },
}, },

View file

@ -17,6 +17,18 @@ local url = import "url.jsonnet";
"-t", "-t",
"0.0", "0.0",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"text-completion-rag": base + { "text-completion-rag": base + {
@ -36,6 +48,18 @@ local url = import "url.jsonnet";
"-o", "-o",
"non-persistent://tg/response/text-completion-rag-response", "non-persistent://tg/response/text-completion-rag-response",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
}, },

View file

@ -15,6 +15,18 @@ local url = import "url.jsonnet";
"--chunk-overlap", "--chunk-overlap",
"10", "10",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"text-completion": base + { "text-completion": base + {
@ -28,6 +40,18 @@ local url = import "url.jsonnet";
"-t", "-t",
"0.0", "0.0",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"text-completion-rag": base + { "text-completion-rag": base + {
@ -45,6 +69,18 @@ local url = import "url.jsonnet";
"-o", "-o",
"non-persistent://tg/response/text-completion-rag-response", "non-persistent://tg/response/text-completion-rag-response",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
}, },

View file

@ -15,6 +15,18 @@ local images = import "images.jsonnet";
"./prometheus:/etc/prometheus", "./prometheus:/etc/prometheus",
"prometheus-data:/prometheus", "prometheus-data:/prometheus",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
grafana: base + { grafana: base + {
image: images.grafana, image: images.grafana,
@ -34,6 +46,18 @@ local images = import "images.jsonnet";
GF_ORG_NAME: "trustgraph.ai", GF_ORG_NAME: "trustgraph.ai",
// GF_SERVER_ROOT_URL: "https://example.com", // GF_SERVER_ROOT_URL: "https://example.com",
}, },
deploy: {
resources: {
limits: {
cpus: '1.0',
memory: '256M'
},
reservations: {
cpus: '0.5',
memory: '256M'
}
}
},
}, },
}, },
} }

View file

@ -16,6 +16,18 @@ milvus + {
"-t", "-t",
url.milvus, url.milvus,
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"query-graph-embeddings": base + { "query-graph-embeddings": base + {
@ -27,6 +39,18 @@ milvus + {
"-t", "-t",
url.milvus, url.milvus,
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
} }

View file

@ -16,6 +16,18 @@ neo4j + {
"-g", "-g",
"bolt://neo4j:7687", "bolt://neo4j:7687",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"store-triples": base + { "store-triples": base + {
@ -27,6 +39,18 @@ neo4j + {
"-g", "-g",
"bolt://neo4j:7687", "bolt://neo4j:7687",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
} }
}, },

View file

@ -15,6 +15,18 @@ local url = import "url.jsonnet";
"-r", "-r",
"${OLLAMA_HOST}", "${OLLAMA_HOST}",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"text-completion-rag": base + { "text-completion-rag": base + {
@ -32,6 +44,18 @@ local url = import "url.jsonnet";
"-o", "-o",
"non-persistent://tg/response/text-completion-rag-response", "non-persistent://tg/response/text-completion-rag-response",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
}, },

View file

@ -17,6 +17,18 @@ local url = import "url.jsonnet";
"-t", "-t",
"0.0", "0.0",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"text-completion-rag": base + { "text-completion-rag": base + {
@ -36,6 +48,18 @@ local url = import "url.jsonnet";
"-o", "-o",
"non-persistent://tg/response/text-completion-rag-response", "non-persistent://tg/response/text-completion-rag-response",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
}, },

View file

@ -13,10 +13,25 @@ local images = import "images.jsonnet";
"6650:6650", "6650:6650",
"8080:8080", "8080:8080",
], ],
environment: {
"PULSAR_MEM": "-Xms300M -Xmx300M"
},
volumes: [ volumes: [
"pulsar-conf:/pulsar/conf", "pulsar-conf:/pulsar/conf",
"pulsar-data:/pulsar/data", "pulsar-data:/pulsar/data",
] ],
deploy: {
resources: {
limits: {
cpus: '1.0',
memory: '900M'
},
reservations: {
cpus: '0.5',
memory: '900M'
}
}
},
}, },
"init-pulsar": base + { "init-pulsar": base + {
image: images.pulsar, image: images.pulsar,
@ -30,6 +45,18 @@ local images = import "images.jsonnet";
condition: "service_started", condition: "service_started",
} }
}, },
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"pulsar-manager": base + { "pulsar-manager": base + {
image: images.pulsar_manager, image: images.pulsar_manager,
@ -39,7 +66,19 @@ local images = import "images.jsonnet";
], ],
environment: { environment: {
SPRING_CONFIGURATION_FILE: "/pulsar-manager/pulsar-manager/application.properties", SPRING_CONFIGURATION_FILE: "/pulsar-manager/pulsar-manager/application.properties",
}, },
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
} }
} }

View file

@ -11,9 +11,24 @@ local images = import "../images.jsonnet";
ports: [ ports: [
"9042:9042" "9042:9042"
], ],
environment: {
JVM_OPTS: "-Xms256M -Xmx256M",
},
volumes: [ volumes: [
"cassandra:/var/lib/cassandra" "cassandra:/var/lib/cassandra"
], ],
deploy: {
resources: {
limits: {
cpus: '1.0',
memory: '512M'
},
reservations: {
cpus: '0.5',
memory: '512M'
}
}
},
}, },
}, },

View file

@ -33,7 +33,17 @@ local images = import "../images.jsonnet";
volumes: [ volumes: [
"etcd:/etcd" "etcd:/etcd"
], ],
}, resources: {
limits: {
cpus: '0.25',
memory: '128M'
},
reservations: {
cpus: '0.25',
memory: '128M'
}
},
},
minio: base + { minio: base + {
image: images.minio, image: images.minio,
@ -54,6 +64,18 @@ local images = import "../images.jsonnet";
volumes: [ volumes: [
"minio-data:/minio_data", "minio-data:/minio_data",
], ],
deploy: {
resources: {
limits: {
cpus: '0.25',
memory: '128M'
},
reservations: {
cpus: '0.25',
memory: '128M'
}
}
},
}, },
milvus: base + { milvus: base + {
@ -72,6 +94,18 @@ local images = import "../images.jsonnet";
volumes: [ volumes: [
"milvus:/var/lib/milvus" "milvus:/var/lib/milvus"
], ],
deploy: {
resources: {
limits: {
cpus: '1.0',
memory: '256M'
},
reservations: {
cpus: '0.5',
memory: '256M'
}
}
},
}, },
}, },

View file

@ -23,6 +23,18 @@ local images = import "../images.jsonnet";
volumes: [ volumes: [
"neo4j:/data" "neo4j:/data"
], ],
deploy: {
resources: {
limits: {
cpus: '1.0',
memory: '256M'
},
reservations: {
cpus: '0.5',
memory: '256M'
}
}
},
}, },
}, },

View file

@ -15,6 +15,18 @@ local url = import "url.jsonnet";
"-p", "-p",
url.pulsar, url.pulsar,
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
chunker: base + { chunker: base + {
@ -28,6 +40,18 @@ local url = import "url.jsonnet";
"--chunk-overlap", "--chunk-overlap",
"15", "15",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
vectorize: base + { vectorize: base + {
@ -37,6 +61,18 @@ local url = import "url.jsonnet";
"-p", "-p",
url.pulsar, url.pulsar,
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
embeddings: base + { embeddings: base + {
@ -48,6 +84,18 @@ local url = import "url.jsonnet";
"-m", "-m",
"all-MiniLM-L6-v2", "all-MiniLM-L6-v2",
], ],
deploy: {
resources: {
limits: {
cpus: '1.0',
memory: '256M'
},
reservations: {
cpus: '0.5',
memory: '256M'
}
}
},
}, },
"kg-extract-definitions": base + { "kg-extract-definitions": base + {
@ -57,6 +105,18 @@ local url = import "url.jsonnet";
"-p", "-p",
url.pulsar, url.pulsar,
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"kg-extract-relationships": base + { "kg-extract-relationships": base + {
@ -66,6 +126,18 @@ local url = import "url.jsonnet";
"-p", "-p",
url.pulsar, url.pulsar,
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"graph-rag": base + { "graph-rag": base + {
@ -85,6 +157,18 @@ local url = import "url.jsonnet";
"--max-subgraph-size", "--max-subgraph-size",
"3000", "3000",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"prompt": base + { "prompt": base + {
@ -98,6 +182,18 @@ local url = import "url.jsonnet";
"--text-completion-response-queue", "--text-completion-response-queue",
"non-persistent://tg/response/text-completion-response", "non-persistent://tg/response/text-completion-response",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"prompt-rag": base + { "prompt-rag": base + {
@ -115,6 +211,18 @@ local url = import "url.jsonnet";
"--text-completion-response-queue", "--text-completion-response-queue",
"non-persistent://tg/response/text-completion-rag-response", "non-persistent://tg/response/text-completion-rag-response",
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
}, },

View file

@ -22,6 +22,18 @@ local url = import "url.jsonnet";
volumes: [ volumes: [
"./vertexai:/vertexai" "./vertexai:/vertexai"
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
"text-completion-rag": base + { "text-completion-rag": base + {
@ -46,6 +58,18 @@ local url = import "url.jsonnet";
volumes: [ volumes: [
"./vertexai:/vertexai" "./vertexai:/vertexai"
], ],
deploy: {
resources: {
limits: {
cpus: '0.1',
memory: '128M'
},
reservations: {
cpus: '0.1',
memory: '128M'
}
}
},
}, },
}, },