Skip to content

Commit

Permalink
improvement(k8s): skip superfluous service endpoint check
Browse files Browse the repository at this point in the history
This check was introduced when resolving an issue a while ago, but
it doesn't appear that this check is really necessary.
  • Loading branch information
edvald committed Nov 12, 2019
1 parent a1e4c1c commit 93ee43c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions garden-service/src/plugins/kubernetes/status/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import dedent = require("dedent")
import { getPods } from "../util"
import { checkWorkloadStatus } from "./workload"
import { checkWorkloadPodStatus } from "./pod"
import { waitForServiceEndpoints } from "./service"
import { gardenAnnotationKey } from "../../../util/string"
import stringify from "json-stable-stringify"

Expand Down Expand Up @@ -213,12 +212,6 @@ export async function waitForResources({ ctx, provider, serviceName, resources,
}

if (combineStates(statuses.map((s) => s.state)) === "ready") {
// If applicable, wait until Services properly point to each Pod in the resource list.
// This step is put in to give the cluster a moment to update its network routing.
// For example, when a Deployment passes its health check, Kubernetes doesn't instantly route Service traffic
// to it. We need to account for this so that dependant tasks, tests and services can reliably run after this
// routine resolves.
await waitForServiceEndpoints(api, statusLine, namespace, resources)
break
}

Expand Down

0 comments on commit 93ee43c

Please sign in to comment.