diff --git a/README.md b/README.md index 02dbea2..2be24d2 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,13 @@ ![GitHub release (latest by date)](https://img.shields.io/github/v/release/keptn-sandbox/keptn-gitea-provisioner-service) ![Go Report Card](https://goreportcard.com/badge/github.com/keptn-sandbox/keptn-gitea-provisioner-service) -This repository contains a reference implementation for a Keptn service that is able to auto-provision git repositories -in Gitea. This is done by utilizing the extension points for [automatic git provisioning](https://keptn.sh/docs/0.16.x/api/git_provisioning/) in Keptn. +This repository contains a reference implementation for a [Keptn extension which auto-provisions git upstream repositories](https://keptn.sh/docs/0.16.x/api/git_provisioning/) in Gitea. ## Compatibility Matrix | Keptn Version* | [Keptn-Service-Template-Go Docker Image](https://hub.docker.com/r/keptn-sandbox/keptn-gitea-provisioner-service/tags) | |:--------------:|:---------------------------------------------------------------------------------------------------------------------:| -| 0.15.1 | keptn-sandbox/keptn-gitea-provisioner-service:0.1.0 | +| 0.15, 0.16 | keptn-sandbox/keptn-gitea-provisioner-service:0.1.0 | \* This is the Keptn version we aim to be compatible with. Other versions should work too, but there is no guarantee. @@ -38,7 +37,7 @@ instance: *Note*: You can re-use existing credentials by omitting the set parameters of the helm installation; For a full list of options that can be set see the chart [helm documentation](chart/README.md). -* If there is no Gitea instance installed, an appropriate instance can be created with the following bash script: +* In case you need a simple Gitea instance, you can create it with following bash script: ```bash #!/bin/bash NAMESPACE=default #Should be configured to match the GITEA_ENDPOINT environment variable when installing the provisioner @@ -98,6 +97,10 @@ To delete a deployed *keptn-gitea-provisioner-service*, use the file `deploy/*.y helm uninstall -n keptn keptn-gitea-provisioner-service ``` +## Architecture + +See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md). + ## License Please find more information in the [LICENSE](LICENSE) file. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md new file mode 100644 index 0000000..d2c70d7 --- /dev/null +++ b/docs/ARCHITECTURE.md @@ -0,0 +1,24 @@ +# Architecture + +Keptn-Gitea-Provisioner-Service is a microservice with a simple job: When a Keptn project without an upstream is created, it creates a git repo and a token on a (remote) Gitea installation, and return the Git Remote URL, username and token, e.g.: + +``` +POST /repository + project=foobar + +{ + "gitRemoteUrl": "http://gitea-server:3000/xyz/foobar.git", + "gitUser": "xyz", + "gitToken": "" +} +``` + +See [Keptn API: Repository - addInstance](https://keptn.sh/api/#/repository/addInstance) for more information. + +In addition, Keptn-Gitea-Provisioner-Service is also responsible for deleting the upstream repository in Gitea when a Keptn project with an automatic provisioned upstream is deleted. + + +## Diagram + +![Architecture](architecture.png) + diff --git a/docs/architecture.png b/docs/architecture.png new file mode 100644 index 0000000..414c260 Binary files /dev/null and b/docs/architecture.png differ