Skip to content

Commit

Permalink
add KubernetesObjectApi for v1
Browse files Browse the repository at this point in the history
  • Loading branch information
j-windsor committed Jul 18, 2023
1 parent 1052414 commit 2c3f9ec
Show file tree
Hide file tree
Showing 5 changed files with 2,816 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/typescript/apply/apply-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export async function apply(specPath: string): Promise<k8s.KubernetesObject[]> {
await client.read(spec);
// we got the resource, so it exists, so patch it
const response = await client.patch(spec);
created.push(response.body);
created.push(response);
} catch (e) {
// we did not get the resource, so it does not exist, so create it
const response = await client.create(spec);
created.push(response.body);
created.push(response);
}
}
return created;
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export * from './top';
export * from './cp';
export * from './patch';
export * from './metrics';
export * from './object';
export { ConfigOptions, User, Cluster, Context } from './config_types';
Loading

0 comments on commit 2c3f9ec

Please sign in to comment.