https://github.com/redhat-developer/gitops-backend
https://github.com/redhat-developer/gitops-backend
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/redhat-developer/gitops-backend
- Owner: redhat-developer
- License: apache-2.0
- Created: 2020-11-11T19:01:56.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-10-08T04:34:38.000Z (3 months ago)
- Last Synced: 2025-10-08T06:20:18.792Z (3 months ago)
- Language: Go
- Size: 795 KB
- Stars: 17
- Watchers: 8
- Forks: 26
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# gitops-backend
This is a service for getting files from a remote Git API.
## Installation
First of all, generate a GitHub access token.
You will need to create a secret in the correct namespace:
```shell
$ kubectl create -f deploy/namespace.yaml
```
```shell
$ kubectl create secret generic -n pipelines-app-delivery \
pipelines-app-gitops --from-literal=token=GENERATE_ME
```
Then you can deploy the resources with:
```shell
$ kubectl apply -k deploy
```
## Usage
Deploy the `Deployment` and `Service` into your cluster.
You can fetch with `https://...?url=https://github.com/org/repo.git?secretNS=my-ns&secretName=my-secret`
You'll need to provide your OpenShift authentication token (`oc whoami --show-token`) as a Bearer token.
```
$ curl -H "Authorization: $(oc whoami --show-token)" https://...?url=https://github.com/org/repo.git?secretNS=my-ns&secretName=my-secret
```
This token is used to authenticate the Kube client request to load the secret by name/namespace to authenticate the call to the upstream Git provider.
The `token` field in the named secret will be extracted and used to authenticate
the request to the upstream Git hosting service.