Skip to content

Commit 18ce3ac

Browse files
authored
Merge pull request #174 from msonnabaum/yaml-fixes
Yaml loader bug fix, wasn't actually exported.
2 parents 0901818 + 35de7d9 commit 18ce3ac

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

examples/yaml-example.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ const yamlString = k8s.dumpYaml({
1212
}
1313
});
1414

15-
const yamlNamespace = k8s.loadYaml(k8s.dumpYaml(yamlString));
15+
const yamlNamespace = k8s.loadYaml(yamlString);
1616

1717
k8sApi.createNamespace(yamlNamespace).then(
1818
(response) => {
1919
console.log('Created namespace');
2020
console.log(response);
21-
k8sApi.readNamespace(namespace.metadata.name).then(
21+
k8sApi.readNamespace(yamlNamespace.metadata.name).then(
2222
(response) => {
2323
console.log(response);
24-
k8sApi.deleteNamespace(
25-
namespace.metadata.name, {} /* delete options */);
24+
k8sApi.deleteNamespace(
25+
yamlNamespace.metadata.name, {} /* delete options */);
2626
});
2727
},
2828
(err) => {
2929
console.log('Error!: ' + err);
3030
}
31-
);
31+
);

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ export * from './attach';
44
export * from './watch';
55
export * from './exec';
66
export * from './portforward';
7+
export * from './yaml';

0 commit comments

Comments
 (0)