Skip to content

Commit

Permalink
fix(server): fix runtime deployment labels (#1585)
Browse files Browse the repository at this point in the history
  • Loading branch information
HUAHUAI23 authored Oct 13, 2023
1 parent 0b612c7 commit 93de793
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/src/instance/instance.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ export class InstanceService {
return
}

deployment.spec = await this.makeDeploymentSpec(app, labels)
deployment.spec = await this.makeDeploymentSpec(
app,
deployment.spec.template.metadata.labels,
)
const appsV1Api = this.cluster.makeAppsV1Api(region)
const namespace = GetApplicationNamespace(region, appid)
const deploymentResult = await appsV1Api.replaceNamespacedDeployment(
Expand All @@ -134,7 +137,9 @@ export class InstanceService {
)

// reapply service
service.spec = this.makeServiceSpec(labels)
service.spec = this.makeServiceSpec(
deployment.spec.template.metadata.labels,
)
const coreV1Api = this.cluster.makeCoreV1Api(region)
const serviceResult = await coreV1Api.replaceNamespacedService(
service.metadata.name,
Expand Down

0 comments on commit 93de793

Please sign in to comment.