File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ export class InstanceService {
111
111
}
112
112
113
113
public async restart ( appid : string ) {
114
+ const labels = this . getRuntimeLabel ( appid )
114
115
const app = await this . applicationService . findOneUnsafe ( appid )
115
116
const region = app . region
116
117
const { deployment, hpa, service } = await this . get ( appid )
@@ -119,10 +120,7 @@ export class InstanceService {
119
120
return
120
121
}
121
122
122
- deployment . spec = await this . makeDeploymentSpec (
123
- app ,
124
- deployment . spec . template . metadata . labels ,
125
- )
123
+ deployment . spec = await this . makeDeploymentSpec ( app , labels )
126
124
const appsV1Api = this . cluster . makeAppsV1Api ( region )
127
125
const namespace = GetApplicationNamespace ( region , appid )
128
126
const deploymentResult = await appsV1Api . replaceNamespacedDeployment (
@@ -136,7 +134,7 @@ export class InstanceService {
136
134
)
137
135
138
136
// reapply service
139
- service . spec = this . makeServiceSpec ( service . metadata . labels )
137
+ service . spec = this . makeServiceSpec ( labels )
140
138
const coreV1Api = this . cluster . makeCoreV1Api ( region )
141
139
const serviceResult = await coreV1Api . replaceNamespacedService (
142
140
service . metadata . name ,
You can’t perform that action at this time.
0 commit comments