Skip to content

EddSuarez/openshift-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

NodeJs library for Openshift origin v3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published