ajpauwels / easy-k8s

MIT License
17 stars 0 forks source link

Not handling other resource types #4

Open moltar opened 5 years ago

moltar commented 5 years ago

Once I passed the namespace issue #3, I ran into another one.

Trying to create the following via updateOrCreate is throwing an error too:

{
      apiVersion: 'v1',
      kind: 'ServiceAccount',
      metadata: { namespace: 'foo', name: 'foo' }
}
    serviceaccounts "foo" not found

      at _request (node_modules/kubernetes-client/lib/backends/request.js:189:25)
      at Request.request [as _callback] (node_modules/kubernetes-client/lib/backends/request.js:148:14)
      at Request.self.callback (node_modules/request/request.js:185:22)
      at Request.<anonymous> (node_modules/request/request.js:1161:10)
      at IncomingMessage.<anonymous> (node_modules/request/request.js:1083:12)
ajpauwels commented 5 years ago

Can I get your code for this one?

moltar commented 5 years ago

This is pretty much it...

const ns = {
      apiVersion: 'v1',
      kind: 'ServiceAccount',
      metadata: { namespace: 'foo', name: 'foo' }
}

updateOrCreate(kubeconfig, ns)