Skip to content

jaideepr97/gitops-backend

Folders and files

NameName
Last commit message
Last commit date
Jan 8, 2021
Dec 11, 2020
Jul 29, 2020
Aug 10, 2020
Feb 11, 2021
Jan 8, 2021
Jan 7, 2021
Jul 22, 2020
Feb 19, 2021
Sep 22, 2020
Jan 7, 2021
Jan 7, 2021

Repository files navigation

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:

$ kubectl create -f deploy/namespace.yaml
$ kubectl create secret generic -n pipelines-app-delivery \
  pipelines-app-gitops --from-literal=token=GENERATE_ME

Then you can deploy the resources with:

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.4%
  • Other 1.6%