Skip to content

Commit

Permalink
Merge "CRD - add Git connection spec in ZuulSpec"
Browse files Browse the repository at this point in the history
  • Loading branch information
Microzuul CI authored and Gerrit Code Review committed Nov 30, 2023
2 parents 0b2e3eb + 14c8ff1 commit 3945530
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
14 changes: 14 additions & 0 deletions api/v1/softwarefactory_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ type GerritConnection struct {
VerifySSL bool `json:"verifyssl,omitempty"`
}

// Describes a Zuul connection using the [git driver](https://zuul-ci.org/docs/zuul/latest/drivers/git.html#connection-configuration).
// When an optional parameter is not specified then Zuul's defaults apply
type GitConnection struct {
// How the connection will be named in Zuul's configuration and appear in zuul-web
Name string `json:"name"`
// [baseurl](https://zuul-ci.org/docs/zuul/latest/drivers/git.html#attr-%3Cgit%20connection%3E.baseurl)
// +kubebuilder:validation:Pattern:=`^(https?|git):\/\/.+$`
Baseurl string `json:"baseurl"`
// [poolDelay](https://zuul-ci.org/docs/zuul/latest/drivers/git.html#attr-%3Cgit%20connection%3E.poll_delays)
PollDelay int32 `json:"pollDelay,omitempty"`
}

// The description of an OpenIDConnect authenticator, see [Zuul's authentication documentation](https://zuul-ci.org/docs/zuul/latest/configuration.html#authentication)
type ZuulOIDCAuthenticatorSpec struct {
// The [name of the authenticator in Zuul's configuration](https://zuul-ci.org/docs/zuul/latest/configuration.html#attr-auth%20%3Cauthenticator%20name%3E)
Expand Down Expand Up @@ -256,6 +268,8 @@ type ZuulSpec struct {
GitHubConns []GitHubConnection `json:"githubconns,omitempty"`
// The list of GitLab-based connections to add to Zuul's configuration
GitLabConns []GitLabConnection `json:"gitlabconns,omitempty"`
// The list of Git-based connections to add to Zuul's configuration
GitConns []GitConnection `json:"gitconns,omitempty"`
// Configuration of the executor microservices
Executor ZuulExecutorSpec `json:"executor,omitempty"`
// Configuration of the scheduler microservice
Expand Down
20 changes: 20 additions & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,31 @@ spec:
- name
type: object
type: array
gitconns:
description: The list of Git-based connections to add to Zuul's
configuration
items:
description: Describes a Zuul connection using the [git driver](https://zuul-ci.org/docs/zuul/latest/drivers/git.html#connection-configuration).
When an optional parameter is not specified then Zuul's defaults
apply
properties:
baseurl:
description: '[baseurl](https://zuul-ci.org/docs/zuul/latest/drivers/git.html#attr-%3Cgit%20connection%3E.baseurl)'
pattern: ^(https?|git):\/\/.+$
type: string
name:
description: How the connection will be named in Zuul's
configuration and appear in zuul-web
type: string
pollDelay:
description: '[poolDelay](https://zuul-ci.org/docs/zuul/latest/drivers/git.html#attr-%3Cgit%20connection%3E.poll_delays)'
format: int32
type: integer
required:
- baseurl
- name
type: object
type: array
githubconns:
description: The list of GitHub-based connections to add to Zuul's
configuration
Expand Down
17 changes: 17 additions & 0 deletions doc/reference/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@ _Appears in:_
| `verifyssl` _boolean_ | Disable SSL certificate verification with the Gerrit instance when set to false. Equivalent to the [verify_ssl](https://zuul-ci.org/docs/zuul/latest/drivers/gerrit.html#attr-%3Cgerrit%20ssh%20connection%3E.verify_ssl) parameter. | -|


#### GitConnection



Describes a Zuul connection using the [git driver](https://zuul-ci.org/docs/zuul/latest/drivers/git.html#connection-configuration). When an optional parameter is not specified then Zuul's defaults apply

_Appears in:_
- [ZuulSpec](#zuulspec)

| Field | Description | Default Value |
| --- | --- | --- |
| `name` _string_ | How the connection will be named in Zuul's configuration and appear in zuul-web | -|
| `baseurl` _string_ | [baseurl](https://zuul-ci.org/docs/zuul/latest/drivers/git.html#attr-%3Cgit%20connection%3E.baseurl) | -|
| `pollDelay` _integer_ | [poolDelay](https://zuul-ci.org/docs/zuul/latest/drivers/git.html#attr-%3Cgit%20connection%3E.poll_delays) | -|


#### GitHubConnection


Expand Down Expand Up @@ -502,6 +518,7 @@ _Appears in:_
| `gerritconns` _[GerritConnection](#gerritconnection) array_ | The list of Gerrit-based connections to add to Zuul's configuration | -|
| `githubconns` _[GitHubConnection](#githubconnection) array_ | The list of GitHub-based connections to add to Zuul's configuration | -|
| `gitlabconns` _[GitLabConnection](#gitlabconnection) array_ | The list of GitLab-based connections to add to Zuul's configuration | -|
| `gitconns` _[GitConnection](#gitconnection) array_ | The list of Git-based connections to add to Zuul's configuration | -|
| `executor` _[ZuulExecutorSpec](#zuulexecutorspec)_ | Configuration of the executor microservices | -|
| `scheduler` _[ZuulSchedulerSpec](#zuulschedulerspec)_ | Configuration of the scheduler microservice | -|
| `web` _[ZuulWebSpec](#zuulwebspec)_ | Configuration of the web microservice | -|
Expand Down

0 comments on commit 3945530

Please sign in to comment.