Skip to content

Commit

Permalink
fix(k8s): better error when manifest has no apiVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Mar 10, 2020
1 parent d10b7bb commit ef18a6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions garden-service/src/plugins/kubernetes/api.ts
Expand Up @@ -230,6 +230,12 @@ export class KubeApi {
async getApiResourceInfo(log: LogEntry, manifest: KubernetesResource): Promise<V1APIResource> {
const apiVersion = manifest.apiVersion

if (!apiVersion) {
throw new KubernetesError(`Missing apiVersion on resource`, {
manifest,
})
}

if (!cachedApiResourceInfo[this.context]) {
cachedApiResourceInfo[this.context] = {}
}
Expand Down

0 comments on commit ef18a6c

Please sign in to comment.