Skip to content

Commit

Permalink
Merge pull request #3 from mdgreenwald/matthew/fixes
Browse files Browse the repository at this point in the history
Quick fixes for v0.0.1
  • Loading branch information
mdgreenwald authored Aug 16, 2019
2 parents e41614f + 046905f commit 8baad40
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,34 @@

Push-Deploy is a Python application which helps to securely and simply enable communication between external tools (GitHub Actions, Circle CI, etc…) and Kubernetes without exposing cluster credentials.

In particular for projects which may not have `semver` inplace where other tools like keel.sh and weave/flux would make more sense.
In particular for projects which may not have `semver` inplace where other tools like [keel.sh](https://keel.sh/) and [weave/flux](https://github.com/fluxcd/flux) would make more sense.

--

### Disclaimer ###

This is pre-release software and is very limited. It will have bugs and lacks many features planned for later releases. The API may also change in ways which are not backwards compatible.

### Configuration ###

* `PD_NAMESPACE`: Namespace of the deployment
* `PD_DEPLOYMENT`: Name of the deployment
* `PD_REGISTRY`: Registry URI e.g. `258640715359.dkr.ecr.us-west-2.amazonaws.com`
* `PD_SECRET_KEY`: A very long (64+ Char) Alpha Numeric string
* `PD_USER`: Username to authenticate with
* `PD_PASSWORD`: Password to authenticate with

### Usage ###

```bash
TOKEN=$(
curl -H "Content-Type: application/json" -X POST \
-d '{"username":"service_account_name","password":"as8djareallylongstring9asdj8a8sdj"}' \
http://pushdeploy.domain.com/api/v1/auth
)
```

```bash
curl -H "Authorization: Bearer $TOKEN" \
http://pushdeploy.domain.com/api/v1/deploy?image_name=my_image&image_tag=v1.0.3
```
4 changes: 2 additions & 2 deletions pushdeploy/apiv1.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def login():
@bp.route('/deploy', methods=['GET'])
@jwt_required
def deploy():
commit_sha = request.args['commit_sha']
image_tag = request.args['image_tag']
image_name = request.args['image_name']
deploy = update_deployment(deployment=read_deployment(), image_name=image_name, image_tag=commit_sha)
deploy = update_deployment(deployment=read_deployment(), image_name=image_name, image_tag=image_tag)
return jsonify(msg=deploy), 201

0 comments on commit 8baad40

Please sign in to comment.