Skip to content

Commit

Permalink
fix: add egress to mongo fqdn (#277)
Browse files Browse the repository at this point in the history
* fix: add egress to mongo fqdn
  • Loading branch information
micahg authored Aug 24, 2024
1 parent c1057a7 commit 5e98a17
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ certificate issuers here because they live in the another chart.

Testing:

```helm upgrade --dry-run --debug --install -f chart/values.yaml -f chart/values-dev.yaml ntt-infra chart```
```helm upgrade --dry-run --debug --install -f chart/values.yaml -f chart/values-dev.yaml --set releaseVersion=0.20.0 --set deployEnv=development ntt-infra chart```

Rollback:

Expand Down
7 changes: 6 additions & 1 deletion chart/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,19 @@ spec:
- ports:
- port: "{{ .Values.otelPort }}"
protocol: TCP
# add mongo egress
{{- if .Values.mongoConnectionString }}
- toFQDNs:
- matchName: "*.mongodb.net"
{{- else }}
- toEndpoints:
- matchLabels:
"app": {{ .Values.mongoName }}
{{- end }}
toPorts:
- ports:
- port: "{{ .Values.mongoPort }}"
protocol: TCP
# add mongo egress
ingress:
- fromEndpoints:
- matchLabels:
Expand Down
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 5e98a17

Please sign in to comment.