Skip to content

Commit

Permalink
fix(k8s): status checks on resources outside of app namespace would fail
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald authored and thsig committed Jun 20, 2019
1 parent 29ae098 commit 13accce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions garden-service/src/plugins/kubernetes/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ export async function checkResourceStatus(
api: KubeApi, namespace: string, resource: KubernetesResource, log: LogEntry, prevStatus?: WorkloadStatus,
) {
const handler = objHandlers[resource.kind]

if (resource.metadata.namespace) {
namespace = resource.metadata.namespace
}

let status: WorkloadStatus
if (handler) {
try {
Expand Down

0 comments on commit 13accce

Please sign in to comment.