Skip to content

Commit 7dbbde4

Browse files
authored
Adding PVs Observability Pods (#1147)
* resolve pvcs for observability pods * remove accidental duplicate file * added claimRefs for each observability pod * added claimRefs to observabilitiy PVs * added claimRefs to observability pods PVs * format fixes
1 parent 9f10cd9 commit 7dbbde4

7 files changed

Lines changed: 95 additions & 2 deletions

File tree

apps/backend/src/bootstrap/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import http from "http";
33

44
import { Config } from "../../../../packages/common/src/utils/config";
55
import log from "../lib/logger";
6-
import cacheRoutes from "../modules/cache/routes";
7-
import loaders, { loadCacheWarmingDependencies } from "./loaders";
6+
import loaders from "./loaders";
87

98
export default async (config: Config) => {
109
const app = express();
@@ -56,6 +55,7 @@ export default async (config: Config) => {
5655
);
5756
};
5857

58+
/**
5959
// Cache warming server bootstrap
6060
export async function bootstrapCacheWarmingServer(config: Config) {
6161
const app = express();
@@ -72,3 +72,4 @@ export async function bootstrapCacheWarmingServer(config: Config) {
7272
"Cache warming server ready"
7373
);
7474
}
75+
**/

apps/backend/src/bootstrap/loaders/apollo.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,24 @@ function createOtelPlugin(): ApolloServerPlugin {
183183
};
184184
}
185185

186+
/**
187+
188+
* Extracts the first query name from a GraphQL operation.
189+
* For example, if the query is "query { catalog(...) { ... } }", this returns "catalog".
190+
*
191+
* @param operation - The parsed GraphQL operation from the request context
192+
* @returns The name of the first query field, or null if not found
193+
194+
function getOperationName(
195+
operation: OperationDefinitionNode | undefined
196+
): string | null {
197+
const firstSelection = operation?.selectionSet?.selections?.[0];
198+
if (firstSelection && "name" in firstSelection)
199+
return firstSelection.name.value;
200+
return null;
201+
}
202+
*/
203+
186204
const SESSION_COOKIE_NAME = "bt.sid";
187205

188206
function getSessionCacheIdFromCookie(

infra/observability/templates/grafana.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ metadata:
5757
labels:
5858
{{- include "bt-observability.grafanaLabels" . | nindent 4 }}
5959
spec:
60+
storageClassName: manual
6061
accessModes:
6162
- ReadWriteOnce
6263
resources:

infra/observability/templates/loki.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ metadata:
6363
labels:
6464
{{- include "bt-observability.lokiLabels" . | nindent 4 }}
6565
spec:
66+
storageClassName: manual
6667
accessModes:
6768
- ReadWriteOnce
6869
resources:

infra/observability/templates/prometheus.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ metadata:
3131
labels:
3232
{{- include "bt-observability.prometheusLabels" . | nindent 4 }}
3333
spec:
34+
storageClassName: manual
3435
accessModes:
3536
- ReadWriteOnce
3637
resources:
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
apiVersion: v1
2+
kind: PersistentVolume
3+
metadata:
4+
name: prometheus-pv
5+
spec:
6+
storageClassName: manual
7+
claimRef:
8+
name: prometheus-data
9+
namespace: bt
10+
capacity:
11+
storage: {{.Values.prometheus.storage.size}}
12+
accessModes:
13+
- ReadWriteOnce
14+
hostPath:
15+
path: /data/prometheus
16+
17+
---
18+
19+
apiVersion: v1
20+
kind: PersistentVolume
21+
metadata:
22+
name: tempo-pv
23+
spec:
24+
storageClassName: manual
25+
claimRef:
26+
name: tempo-data
27+
namespace: bt
28+
capacity:
29+
storage: {{.Values.tempo.storage.size}}
30+
accessModes:
31+
- ReadWriteOnce
32+
hostPath:
33+
path: /data/tempo
34+
35+
---
36+
37+
apiVersion: v1
38+
kind: PersistentVolume
39+
metadata:
40+
name: loki-pv
41+
spec:
42+
storageClassName: manual
43+
claimRef:
44+
name: loki-data
45+
namespace: bt
46+
capacity:
47+
storage: {{.Values.loki.storage.size}}
48+
accessModes:
49+
- ReadWriteOnce
50+
hostPath:
51+
path: /data/loki
52+
53+
54+
---
55+
56+
apiVersion: v1
57+
kind: PersistentVolume
58+
metadata:
59+
name: grafana-pv
60+
spec:
61+
storageClassName: manual
62+
claimRef:
63+
name: grafana-data
64+
namespace: bt
65+
capacity:
66+
storage: {{.Values.grafana.storage.size}}
67+
accessModes:
68+
- ReadWriteOnce
69+
hostPath:
70+
path: /data/grafana

infra/observability/templates/tempo.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ metadata:
6060
labels:
6161
{{- include "bt-observability.tempoLabels" . | nindent 4 }}
6262
spec:
63+
storageClassName: manual
6364
accessModes:
6465
- ReadWriteOnce
6566
resources:

0 commit comments

Comments
 (0)