Skip to content

Commit fbe2623

Browse files
Apply suggestions from code review
Co-authored-by: Simon Gerber <simon.gerber@vshn.ch>
1 parent fe9f02f commit fbe2623

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/modules/SDDs/pages/0032-compile-pipeline.adoc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
:sdd_author: Aline Abler
44
:sdd_owner: Project Syn IG
5-
:sdd_reviewers: Simon Gerber
5+
:sdd_reviewers: Simon Gerber, Tobias Brunner
66
:sdd_date: 2024-06-13
77
:sdd_status: draft
88

@@ -62,8 +62,10 @@ The `accessTokenSecretName` field contains a reference to a secret.
6262
If it is set, the Lieutenant operator will store an access token into this secret, which can be used to access the Git repository.
6363
In the case of GitLab, this would be a Project Access Token with read-write access to the repository.
6464

65-
The `ciVariables` field contains a dictionary describing variable names and corresponding values.
66-
These variables are added to the git repository as CI/CD variables.
65+
The `ciVariables` field contains a list of objects describing variable names and corresponding values.
66+
Each object in the list has a type that's modeled after a Kubernetes container's `env` field.
67+
In contrast to container environment variables, our variables only support specifying values directly (via field `value`) or by referencing a `Secret` resource (via field `valueFrom.secretKeyRef`).
68+
These variables are added to the Git repository as CI/CD variables.
6769

6870
[source,yaml]
6971
----
@@ -130,7 +132,7 @@ spec:
130132

131133
Configuring the CI pipeline usually happens through files committed to the corresponding repository.
132134
For a Lieutenant-managed pipeline configuration, these files should be managed by Lieutenant.
133-
To achieve this, we can leverage the existing mechanism to commit template files to git repositories:
135+
To achieve this, we can leverage the existing mechanism to commit template files to Git repositories:
134136

135137
[source,yaml]
136138
----
@@ -152,7 +154,7 @@ spec:
152154

153155
=== Operator
154156

155-
The Lieutenant Operator will be extended to automatically manage the compile pipeline for repositories where this is enabled (by way of configuring the `compilePipeline` field on the tenant and the `enableCompilePipeline` field on the cluster).
157+
The Lieutenant Operator will be extended to automatically manage the compile pipeline for repositories where this is enabled (by way of deploying the CI config file in the tenant and the `enableCompilePipeline` field on the cluster).
156158

157159
Since the compile pipeline has to interact with both the tenant repository as well as the cluster catalog repositories, it must be enabled on both corresponding resources for the configuration to be functional.
158160
This way, it is possible to enable auto-compilation for some, but not all clusters on a tenant.
@@ -162,7 +164,7 @@ The operator will reconcile *GitRepos* as follows:
162164
* When `spec.accessTokenSecretName` is set, the operator generates an access token for the corresponding repository (via the repository host's API, using the API secret in `.spec.apiSecretRef`), and writes this token into a secret with the given name.
163165
In the case of GitLab, this is a Project Access Token.
164166
The operator also runs a scheduled job which refreshes these tokens when they are close to expiring, or when they no longer exist on the repository host.
165-
* The content of `.spec.ciVariables` is written to the repository's configuration on the git host.
167+
* The content of `.spec.ciVariables` is written to the repository's configuration on the Git host.
166168
In the case of GitLab, it is written as CI/CD variables.
167169

168170
NOTE: If the GitRepo is of type `unmanaged`, none of these steps will be executed.

0 commit comments

Comments
 (0)