Skip to content

Commit f6e890b

Browse files
authored
Fix bug in async api update (#2067)
1 parent c386d05 commit f6e890b

File tree

1 file changed

+3
-3
lines changed
  • pkg/operator/resources/asyncapi

1 file changed

+3
-3
lines changed

pkg/operator/resources/asyncapi/api.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ func getK8sResources(apiConfig userconfig.API) (resources, error) {
330330
}
331331

332332
func applyK8sResources(api spec.API, prevK8sResources resources, queueURL string) error {
333-
gatewayDeployment := apiDeploymentSpec(api, prevK8sResources.apiDeployment, queueURL)
334-
apiDeployment := gatewayDeploymentSpec(api, prevK8sResources.gatewayDeployment, queueURL)
333+
apiDeployment := apiDeploymentSpec(api, prevK8sResources.apiDeployment, queueURL)
334+
gatewayDeployment := gatewayDeploymentSpec(api, prevK8sResources.gatewayDeployment, queueURL)
335335
gatewayService := gatewayServiceSpec(api)
336336
gatewayVirtualService := gatewayVirtualServiceSpec(api)
337337

@@ -359,7 +359,7 @@ func applyK8sDeployment(api spec.API, prevDeployment *kapps.Deployment, newDeplo
359359
}
360360
} else if prevDeployment.Status.ReadyReplicas == 0 {
361361
// Delete deployment if it never became ready
362-
_, _ = config.K8s.DeleteDeployment(operator.K8sName(api.Name))
362+
_, _ = config.K8s.DeleteDeployment(prevDeployment.Name)
363363
_, err := config.K8s.CreateDeployment(newDeployment)
364364
if err != nil {
365365
return err

0 commit comments

Comments
 (0)