Skip to content

Commit

Permalink
gitlabconns - ensure 'secrets' key as mandatory with minlength
Browse files Browse the repository at this point in the history
Change-Id: I0319e86050e1907fefcdc8385afcf46d716fc1f8
  • Loading branch information
morucci committed Jan 15, 2024
1 parent 35b761c commit dd7958b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/v1/softwarefactory_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ type GitLabConnection struct {
// the [api_token](https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html#attr-%3Cgitlab%20connection%3E.api_token)
// the [api_token_name](https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html#attr-%3Cgitlab%20connection%3E.api_token_name)
// the [webhook_token](https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html#attr-%3Cgitlab%20connection%3E.webhook_token)
Secrets string `json:"secrets,omitempty"`
// +kubebuilder:validation:MinLength:=1
Secrets string `json:"secrets"`
// the [apiTokenName](https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html#attr-%3Cgitlab%20connection%3E.api_token_name)
APITokenName string `json:"apiTokenName,omitempty"`
// the [cloneUrl](https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html#attr-%3Cgitlab%20connection%3E.cloneurl)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,14 @@ spec:
keys: the [api_token](https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html#attr-%3Cgitlab%20connection%3E.api_token)
the [api_token_name](https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html#attr-%3Cgitlab%20connection%3E.api_token_name)
the [webhook_token](https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html#attr-%3Cgitlab%20connection%3E.webhook_token)'
minLength: 1
type: string
server:
description: the [server](https://zuul-ci.org/docs/zuul/latest/drivers/gitlab.html#attr-%3Cgitlab%20connection%3E.server)
type: string
required:
- name
- secrets
type: object
type: array
merger:
Expand Down

0 comments on commit dd7958b

Please sign in to comment.