Skip to content

Commit b1d6807

Browse files
committed
fix: pod이름 랜덤 생성
1 parent 5db9ff8 commit b1d6807

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

DBManager/src/k8s/K8SApi.service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,14 @@ export class K8SApiService {
4545
await this.redisService.delPod(podName);
4646
}
4747
};
48-
4948

5049
this.k8sWatch.watch(path, queryParams, handlePodEvent, err => {});
5150
}
5251

5352
async createPod() {
54-
const podName = `mysql-pod${this.podCnt++}`;
5553
const mysqlPod = {
5654
metadata: {
57-
name: podName,
55+
generateName: 'mysql-',
5856
labels: {
5957
app: 'mysql',
6058
},

0 commit comments

Comments
 (0)