Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Gerber <[email protected]>
  • Loading branch information
HappyTetrahedron and simu authored Jun 17, 2024
1 parent d337890 commit 56dd506
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/modules/SDDs/pages/0032-compile-pipeline.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ This will go hand-in-hand with the existing repository management features in Li
=== Requirements for Pipeline Configuration

Lieutenant imposes certain assumptions on the configuration of the pipeline:
Namely, the pipeline has to be set up on the tenant repository by way of adding (arbitrary) files to the repository,
and it is configured through setting CI/CD variables on the repository.
Namely, the pipeline has to be set up on the tenant repository by way of adding (arbitrary) files to the repository, and it is configured through setting CI/CD variables on the repository.

In particular, Lieutenant configures the following CI/CD variables:

Expand All @@ -60,7 +59,7 @@ In particular, Lieutenant configures the following CI/CD variables:
We add two new fields to the `GitRepoTemplate` (and, by extension, the `GitRepo`) CRD, under the `.spec` key, called `accessTokenSecretRef` and `ciVariables`.

The `accessTokenSecretRef` field contains a reference to a secret.
If it is set, the Lieutenant operator will store an access token into this secret, which can be used to access the git repository.
If it is set, the Lieutenant operator will store an access token into this secret, which can be used to access the Git repository.
In the case of GitLab, this would be a Project Access Token with read-write access to the repository.

The `ciVariables` field contains a dictionary describing variable names and corresponding values.
Expand Down Expand Up @@ -158,13 +157,13 @@ The operator will reconcile *Tenants* as follows:

* When `.spec.compilePipeline` exists and isn't empty, the following entries are added to the tenant repository GitRepo's `.spec.ciVariables`:
** `COMMODORE_API_URL`, containing the URL at which the Lieutenant API can be accessed.
** `COMMODORE_API_TOKEN`, containing the tenant's access token for the Lieutenant API.
** `COMMODORE_API_TOKEN`, containing a reference to the secret which contains the tenant's access token for the Lieutenant API.
** `CLUSTERS`, containing a space-separated list of cluster IDs taken directly from `.spec.compilePipeline.clusters`.
* For each entry in `.spec.compilePipeline.pipelineFiles` whose value isn't `{remove}`, a new corresponding entry is added to the tenant's `.spec.gitRepoTemplate.templateFiles`.
* For each entry in `.spec.compilePipeline.pipelineFiles` whose value is `{remove}`, the corresponding entry is removed from the tenant's `.spec.gitRepoTemplate.templateFiles`.
* For each entry in `.spec.compilePipeline.clusters`, another entry is added to the tenant repository GitRepo's `spec.ciVariabes`.
The key is `ACCESS_TOKEN_CLUSTERNAME`, where `CLUSTERNAME` is the ID of a specific cluster, with `-` replaced by `_`.
The value is the access token to access that cluster's catalog repository, taken from the secret specified in the catalog GitRepo configuration under `.spec.accessTokenSecretRef`.
The value is a reference to the secret containing the access token to access that cluster's catalog repository, taken from the secret specified in the catalog GitRepo configuration under `.spec.accessTokenSecretRef`.

=== Implementation Details/Notes/Constraints

Expand Down

0 comments on commit 56dd506

Please sign in to comment.