https://github.com/rosscdh/bs
This project will use jinja to sanely let you process and convert yaml for Openshift oc without the BS.
https://github.com/rosscdh/bs
oc openshift paramatize process
Last synced: about 2 months ago
JSON representation
This project will use jinja to sanely let you process and convert yaml for Openshift oc without the BS.
- Host: GitHub
- URL: https://github.com/rosscdh/bs
- Owner: rosscdh
- Created: 2019-01-22T15:25:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-23T09:10:57.000Z (over 7 years ago)
- Last Synced: 2025-01-28T00:17:00.595Z (over 1 year ago)
- Topics: oc, openshift, paramatize, process
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Openshift BS
```
oc process -p NODE_PORT=2343
```
will output a `${NODE_PORT}` that.. is a..... STRING. Which will throw a "not an iInt error when running for the 2nd time against the remote Openshift Server
This project will use jinja to sanely let you process and convert yaml without the BS.
### Install using docker
```bash
make build
make shell
# or
docker pull rosscdh/oc-bs:latest
docker run --rm \
-v ${PWD}:/src \
-it rosscdh/oc-bs:latest --help
```
### Using
Now you have access to all of jinja2 powerful filters as well as some base64 encode/decode built for openshift secrets
http://jinja.pocoo.org/docs/2.10/templates/
Simply output `{{ variabels | filter }}` in your yaml files.
```bash
docker run --rm \
-v ${PWD}/example.yml:/src/example.yml \
-it rosscdh/oc-bs:latest -f /src/example.yaml -p NODEPORT=33012 -p NLB_NODE_PORT_ACCOUNTWEB=33012
```
```bash
bs -f example.yml -p NODEPORT=33012 -p NLB_NODE_PORT_ACCOUNTWEB=33012
# save output to a file
bs -f example.yml -p NODEPORT=33012 -p NLB_NODE_PORT_ACCOUNTWEB=33012 -o test.json
```
### Install locally
```bash
python setup.py install
```
### TODO
* allow a `-c path/to/context.yaml` for loading in secrets and context variables so you dont have to pass `-p KEY=VALUE in which is kinda ugly`