# openshift-node

> NodeJs library for Openshift origin v3

Latest version **0.0.46** (published 2017-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install openshift-node
pnpm add openshift-node
yarn add openshift-node
bun add openshift-node
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.46 |
| Published | 2017-10-16 |
| First published | 2017-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | EddSuarez |
| Maintainers | eddsuarez |
| Keywords | openshift, thedigitalgarage |

## Links

- npm: https://www.npmjs.com/package/openshift-node
- Repository: https://github.com/EddSuarez/openshift-node
- Homepage: https://github.com/EddSuarez/openshift-node#readme
- Issues: https://github.com/EddSuarez/openshift-node/issues
- npm.io page: https://npm.io/package/openshift-node

## Dependencies (5)

- [chai](https://npm.io/package/chai.md) ^4.1.2
- [request](https://npm.io/package/request.md) ^2.81.0
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.26.0
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.26.0
- [request-promise](https://npm.io/package/request-promise.md) ^4.2.1

## Recent versions

- 0.0.46 (latest) — 2017-10-16
- 0.0.44 — 2017-10-16
- 0.0.43 — 2017-10-16
- 0.0.42 — 2017-10-16
- 0.0.41 — 2017-10-16
- 0.0.4 — 2017-10-16
- 0.0.3 — 2017-10-16
- 0.0.2 — 2017-10-16
- 0.0.1 — 2017-10-16
- 0.0.0 — 2017-10-13

## README

# 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.

```javascript
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](#project-object)
- **projects.remove(namespace)** 

### RoleBindings
- **rolebindings.get(namespace)**
- **rolebindings.add(project)** - [Rolebinding object](#rolebinding-object)
- **rolebindings.update(project)** - [Rolebinding object](#rolebinding-object)
- **rolebindings.remove(namespace, rolebindingName)** 

### Limits
- **limits.add(project)** - [Limit object](#limit-object)
- **limits.update(project)** - [Limit object](#limit-object)
- **limits.remove(namespace, limitName)** 

### Quotas
- **quotas.add(project)** - [Quota object](#quota-object)
- **quotas.update(project)** - [Quota object](#quota-object)
- **quotas.remove(namespace, quotaName)** 

### Pods
- **pods.get(namespace)**
- **pods.scale(project)** - [Scale object](#scale-object)

### Templates
- **template.process(templateObject)**

#### Project object
```JSON
{
 "name": "-",
 "description": "-",
 "displayName": "-"
}
```

#### Rolebinding object
```JSON
{
 "name": "-",
 "userNames": [],
 "subjects": [],
 "rolRefName": "-"
}
```

#### Limit object
```JSON
{
 "name": "-",
 "specs": {}
}
```

#### Quota object
```JSON
{
 "name": "-",
 "specs": {}
}
```

#### Scale object
```JSON
{
 "deployment": "-",
 "namespace": "-",
 "replicas": 0
}
```

## License

See the [LICENSE](https://github.com/eddsuarez/node-openshift/blob/master/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.

---
_Source: https://npm.io/package/openshift-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
