Skip to content

Commit e462873

Browse files
authored
test: Auto Sync Test (POD IP return)
1 parent 7f7f315 commit e462873

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

devops/helm/mgmg/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ ingress:
4040
env:
4141
- name: LOG_LEVEL
4242
value: "info"
43+
name: POD_IP
44+
valueFrom:
45+
fieldRef:
46+
fieldPath: status.podIP
4347

4448
configMap:
4549
name: mgmg-env

src/app.controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Controller, Get } from '@nestjs/common';
22
import { AppService } from './app.service';
3-
import * as ip from 'ip';
3+
import * as process from 'node:process';
44

55
@Controller()
66
export class AppController {
77
constructor(private readonly appService: AppService) {}
88

99
@Get()
1010
getHello(): string {
11-
return `${this.appService.getHello()} (${ip.address()})`;
11+
return `${this.appService.getHello()} (${process.env.POD_IP || '알 수 없음'})`;
1212
}
1313
}

0 commit comments

Comments
 (0)