Skip to content

Commit

Permalink
fix: enable api access to grafana namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
micahg committed Aug 24, 2024
1 parent 458b145 commit b807e6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
30 changes: 8 additions & 22 deletions chart/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@ spec:
- ports:
- port: "443"
protocol: TCP
- toFQDNs:
- matchName: {{ .Values.otelDomain }}
toPorts:
- ports:
- port: "{{ .Values.otelPort }}"
protocol: TCP
- toEndpoints:
- matchLabels:
"k8s:io.kubernetes.pod.namespace": kube-system
Expand All @@ -128,6 +122,13 @@ spec:
rules:
dns:
- matchPattern: "*"
- toEndpoints:
- matchLabels:
"k8s:io.kubernetes.pod.namespace": grafana
toPorts:
- ports:
- port: "{{ .Values.otelPort }}"
protocol: TCP
- toEndpoints:
-matchLabels:
"app": {{ .Values.mongoName }}
Expand All @@ -143,19 +144,4 @@ spec:
toPorts:
- ports:
- port: "3000"
protocol: TCP
---
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
name: {{ .Values.apiAppName }}-allow-outbound-otel
namespace: {{ .Values.namespace }}
spec:
endpointSelector:
matchLabels:
app: {{ .Values.apiAppName }}
egress:
- toServices:
- k8sService:
serviceName: grafana-k8s-monitoring-alloy
namespace: grafana
protocol: TCP
2 changes: 1 addition & 1 deletion packages/api/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import mongoose from "mongoose";
import { WebSocketServer } from "ws";
import { ValueType, metrics } from "@opentelemetry/api";

// mongoose.set('debug', true); //
// mongoose.set('debug', true);

log.info(`System starting in ${process.env.NODE_ENV}`);

Expand Down

0 comments on commit b807e6b

Please sign in to comment.