Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions deploy/charts/rig-platform/templates/_config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ client:
baseUrl: {{ .client.operator.baseUrl }}
{{- end }}

{{- if .client.git }}
git:
author: {{ .client.git.author | toYaml | nindent 6 }}
{{- end }}

environments:
{{- if .environments }}
Expand Down Expand Up @@ -136,6 +140,13 @@ client:
smtp:
password: {{ .smtp.password | quote }}
{{- end }}
{{- if and .git .git.auths }}
git:
auths:
{{- range .git.auths }}
- {{ . | toYaml | indent 8 | trim }}
{{- end }}
{{- end }}
{{- end }}

{{- if .repository.secret }}
Expand Down
50 changes: 38 additions & 12 deletions docs/docs/api/config/v1alpha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ _Appears in:_
| `smtp` _[ClientSMTP](#clientsmtp)_ | SMTP sets the host, port, username and password for the SMTP client. |
| `operator` _[ClientOperator](#clientoperator)_ | Operator sets the base url for the Operator client. |
| `slack` _[ClientSlack](#clientslack)_ | Slack holds configuration for sending slack messages. |
| `git` _[ClientGit](#clientgit)_ | Git client configuration for communicating with multiple repositories. |


### ClientDocker
Expand All @@ -96,6 +97,21 @@ _Appears in:_
| `host` _string_ | Host where the docker daemon can be reached. |


### ClientGit





_Appears in:_
- [Client](#client)

| Field | Description |
| --- | --- |
| `auths` _[GitAuth](#gitauth) array_ | Auths the git client can behave as. |
| `author` _[GitAuthor](#gitauthor)_ | Author used when creating commits. |


### ClientMailjet


Expand Down Expand Up @@ -211,9 +227,9 @@ _Appears in:_
| `branch` _string_ | Branch to commit changes to. |
| `pathPrefix` _string_ | PathPrefix path to commit to in git repository. Deprecated: Use `pathPrefixes` instead. |
| `pathPrefixes` _[PathPrefixes](#pathprefixes)_ | PathPrefixes path to commit to in git repository |
| `credentials` _[GitCredentials](#gitcredentials)_ | Credentials to use when connecting to git. |
| `author` _[GitAuthor](#gitauthor)_ | Author used when creating commits. |
| `templates` _[GitTemplates](#gittemplates)_ | Templates used for commit messages. |
| `credentials` _[GitCredentials](#gitcredentials)_ | Credentials to use when connecting to git. Deprecated: Use `client.git.auths` instead. |
| `author` _[GitAuthor](#gitauthor)_ | Author used when creating commits. Deprecated: Use `client.git.author` instead. |


### ClusterType
Expand Down Expand Up @@ -282,13 +298,30 @@ _Appears in:_



### GitAuth





_Appears in:_
- [ClientGit](#clientgit)

| Field | Description |
| --- | --- |
| `url` _string_ | URL is a exact match for the repo-url this auth can be used for. |
| `urlPrefix` _string_ | URLPrefix is a prefix-match for the repo urls this auth can be used for. |
| `credentials` _[GitCredentials](#gitcredentials)_ | Credentials to use when connecting to git. |


### GitAuthor



GitAuthor specifies a git commit author

_Appears in:_
- [ClientGit](#clientgit)
- [ClusterGit](#clustergit)

| Field | Description |
Expand All @@ -305,6 +338,7 @@ GitCredentials specifies how to authenticate against git.

_Appears in:_
- [ClusterGit](#clustergit)
- [GitAuth](#gitauth)

| Field | Description |
| --- | --- |
Expand All @@ -329,17 +363,13 @@ _Appears in:_

### HTTPSCredential


_Underlying type:_ _[struct{Username string "json:\"username,omitempty\""; Password string "json:\"password,omitempty\""}](#struct{username-string-"json:\"username,omitempty\"";-password-string-"json:\"password,omitempty\""})_

HTTPSCredential specifies basic auth credentials

_Appears in:_
- [GitCredentials](#gitcredentials)

| Field | Description |
| --- | --- |
| `username` _string_ | Username is the basic auth user name |
| `password` _string_ | Password is the basic auth password |


### Logging
Expand Down Expand Up @@ -521,17 +551,13 @@ _Appears in:_

### SSHCredential


_Underlying type:_ _[struct{PrivateKey string "json:\"privateKey,omitempty\""; PrivateKeyPassword string "json:\"password,omitempty\""}](#struct{privatekey-string-"json:\"privatekey,omitempty\"";-privatekeypassword-string-"json:\"password,omitempty\""})_

SSHCredential specifies SSH credentials

_Appears in:_
- [GitCredentials](#gitcredentials)

| Field | Description |
| --- | --- |
| `privateKey` _string_ | PrivateKey is a PEM encoded SSH private key. |
| `password` _string_ | PrivateKeyPassword is an optional password for the SSH private key. |


### SSO
Expand Down
29 changes: 26 additions & 3 deletions pkg/api/config/v1alpha1/platform_config_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ type Client struct {

// Slack holds configuration for sending slack messages.
Slack ClientSlack `json:"slack,omitempty"`

// Git client configuration for communicating with multiple repositories.
Git ClientGit `json:"git,omitempty"`
}

// Logging specifies logging configuration.
Expand Down Expand Up @@ -296,15 +299,16 @@ type ClusterGit struct {

// PathPrefixes path to commit to in git repository
PathPrefixes PathPrefixes `json:"pathPrefixes,omitempty"`
// Templates used for commit messages.
Templates GitTemplates `json:"templates,omitempty"`

// Credentials to use when connecting to git.
// Deprecated: Use `client.git.auths` instead.
Credentials GitCredentials `json:"credentials,omitempty"`

// Author used when creating commits.
// Deprecated: Use `client.git.author` instead.
Author GitAuthor `json:"author,omitempty"`

// Templates used for commit messages.
Templates GitTemplates `json:"templates,omitempty"`
}

// PathPrefixes is the (possibly templated) path prefix to commit to in git repository
Expand All @@ -314,6 +318,25 @@ type PathPrefixes struct {
Project string `json:"project,omitempty"`
}

type ClientGit struct {
// Auths the git client can behave as.
Auths []GitAuth `json:"auths,omitempty"`

// Author used when creating commits.
Author GitAuthor `json:"author,omitempty"`
}

type GitAuth struct {
// URL is a exact match for the repo-url this auth can be used for.
URL string `json:"url,omitempty"`

// URLPrefix is a prefix-match for the repo urls this auth can be used for.
URLPrefix string `json:"urlPrefix,omitempty"`

// Credentials to use when connecting to git.
Credentials GitCredentials `json:"credentials,omitempty"`
}

// GitCredentials specifies how to authenticate against git.
type GitCredentials struct {
// HTTPS specifies basic auth credentials.
Expand Down
42 changes: 40 additions & 2 deletions pkg/api/config/v1alpha1/zz_generated.deepcopy.go

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