0.0.46 • Published 7 years ago

openshift-node v0.0.46

Weekly downloads
14
License
MIT
Repository
github
Last release
7 years ago

openshift-node

NodeJs library for Openshift origin v3

Install

npm install --save openshift-node

Usage

You need a secret token from some service account with cluster privileges.

const Openshift = require('openshift-node');
const api = new Openshift('OPENSHIFT_HOST', 'OPENSHIFT_API_TOKEN');

...
const project = await api.projects.get('edd');
console.log(project.body); // { "kind": "Project", "apiVersion": "v1" ... }
...

}

Functions

Resources

  • resource.getAll(namespace, resourceKind)
  • resource.get(namespace, resourceObject)
  • resource.add(namespace, resourceObject)
  • resource.update(namespace, resourceObject)
  • resource.remove(namespace, resourceObject)

Projects

  • projects.get(namespace)
  • projects.add(project) - Project object
  • projects.remove(namespace)

RoleBindings

Limits

Quotas

Pods

Templates

  • template.process(templateObject)

Project object

{
 "name": "-",
 "description": "-",
 "displayName": "-"
}

Rolebinding object

{
 "name": "-",
 "userNames": [],
 "subjects": [],
 "rolRefName": "-"
}

Limit object

{
 "name": "-",
 "specs": {}
}

Quota object

{
 "name": "-",
 "specs": {}
}

Scale object

{
 "deployment": "-",
 "namespace": "-",
 "replicas": 0
}

License

See the LICENSE file for license rights and limitations (MIT).

Contributing

If you'd like to suggest an improvement, please raise an issue to discuss it before making your pull request. Pull requests for bugs are more than welcome - please explain the bug you're trying to fix in the message.

0.0.46

7 years ago

0.0.44

7 years ago

0.0.43

7 years ago

0.0.42

7 years ago

0.0.41

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago