Skip to content

Commit

Permalink
fix: allow ingress annotations in service status
Browse files Browse the repository at this point in the history
Fixes a regression where getting the service status of a k8s service
would fail (e.g. when calling garden get status or garden deploy).
  • Loading branch information
thsig authored and edvald committed Feb 28, 2019
1 parent 0bd8056 commit fac3193
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions garden-service/src/plugins/kubernetes/container/ingress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import * as Bluebird from "bluebird"
import { certpem } from "certpem"
import { omit, find, extend } from "lodash"
import { find, extend } from "lodash"
import { findByName } from "../../../util/util"
import { ContainerService, ContainerIngressSpec } from "../../container/config"
import { IngressTlsCertificate } from "../kubernetes"
Expand Down Expand Up @@ -113,7 +113,12 @@ async function getIngressesWithCert(service: ContainerService, api: KubeApi): Pr

export async function getIngresses(service: ContainerService, api: KubeApi): Promise<ServiceIngress[]> {
return (await getIngressesWithCert(service, api))
.map(e => omit(e, ["certificate", "spec"]))
.map(ingress => ({
hostname: ingress.hostname,
path: ingress.path,
port: ingress.port,
protocol: ingress.protocol,
}))
}

async function getCertificateHostnames(api: KubeApi, cert: IngressTlsCertificate): Promise<string[]> {
Expand Down

0 comments on commit fac3193

Please sign in to comment.