Skip to content

Commit

Permalink
Merge pull request #1170 from j-windsor/addObject
Browse files Browse the repository at this point in the history
Add KubernetesObjectApi for v1
  • Loading branch information
k8s-ci-robot committed Jul 19, 2023
2 parents d38c072 + 2c3f9ec commit 2fc86b3
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';

0 comments on commit 2fc86b3

Please sign in to comment.