We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fd3c72b + 947fe92 commit a784713Copy full SHA for a784713
node-client/src/config.ts
@@ -165,12 +165,12 @@ export class KubeConfig {
165
166
public loadFromString(config: string) {
167
var obj = yaml.safeLoad(config);
168
- if (obj.apiVersion != 'v1') {
169
- throw new TypeError('unknown version: ' + obj.apiVersion);
+ if (obj['apiVersion'] != 'v1') {
+ throw new TypeError('unknown version: ' + obj['apiVersion']);
170
}
171
- this.clusters = newClusters(obj.clusters);
172
- this.contexts = newContexts(obj.contexts);
173
- this.users = newUsers(obj.users);
+ this.clusters = newClusters(obj['clusters']);
+ this.contexts = newContexts(obj['contexts']);
+ this.users = newUsers(obj['users']);
174
this.currentContext = obj['current-context'];
175
176
0 commit comments