Skip to content

Commit

Permalink
Add link to gitops gen module library in README (#281)
Browse files Browse the repository at this point in the history
* add link to gitops gen module library in README

Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>

* Address PR feedback

Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>

---------

Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>
  • Loading branch information
maysunfaisal authored Mar 14, 2023
1 parent d4d3f6e commit 80c3a89
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Webhooks require self-signed certificates to validate the resources. To disable
### Useful links:
* [HAS Project information page](https://docs.google.com/document/d/1axzNOhRBSkly3M2Y32Pxr1MBpBif2ljb-ufj0_aEt74/edit?usp=sharing)
* Every Prow job executed by the CI system generates an artifacts directory containing information about that execution and its results. This [document](https://docs.ci.openshift.org/docs/how-tos/artifacts/) describes the contents of this directory and how they can be used to investigate the steps by the job.
* For more information on the GitOps resource generation, please refer to the [gitops-generation](./docs/gitops-generation.md) documentation

## Contributions

Expand Down
23 changes: 23 additions & 0 deletions docs/gitops-generation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# GitOps Generation

The generation of GitOps resources is handled by the go module [redhat-developer/gitops-generator](https://github.com/redhat-developer/gitops-generator). Please refer to the module's README for more information on the usage.

### Business Logic

The application-service `Component` controller parses the devfile's `deploy` command, and gets the corresponding `kubernetes` component outerloop resources. The controller overwrites the first resource of each Deployment, Service, Route type with the `Component` configuration and calls the Gitops generation library.

If for any reason, the controller is unable to find the devfile `kubernetes` component outerloop information, barring an error condition, the GitOps generation library will generate the Deployment, Service and Route resources from the `Component` configuration information.

### Development

When working on a story that requires contribution to [redhat-developer/gitops-generator](https://github.com/redhat-developer/gitops-generator)

- replace the gitops-generator go module's path in your local `go.mod` with the local path of a gitops-generator repository to ensure application-service is working as expected
- Example, replace the gitops generator module with the local path in go.mod:
```go
replace github.com/redhat-developer/gitops-generator => <path-to-local-gitops-generator-repo>
```

- have your changes reviewed and merged directly to the [redhat-developer/gitops-generator](https://github.com/redhat-developer/gitops-generator) repository
- after merging the gitops-generator changes, run `go list -m -json github.com/redhat-developer/gitops-generator@latest` to determine the latest version of the gitops-generator library module
- remove the local reference of the gitops-generator module and update to the version from the previous step in your `go.mod` file

0 comments on commit 80c3a89

Please sign in to comment.