Add ability to specify github enpoints for creds

The GitHub credentials section now allows setting some API endpoints
that point the github client and the runner setup script to the propper
URLs. This allows us to use garm with an on-prem github enterprise server.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2022-10-12 21:45:07 +00:00
parent a55f852161
commit f40420bfb6
No known key found for this signature in database
GPG key ID: 7D073DCC2C074CB5
11 changed files with 196 additions and 45 deletions

View file

@ -98,6 +98,8 @@ type BootstrapInstance struct {
// provider supports it.
SSHKeys []string `json:"ssh-keys"`
CACertBundle []byte `json:"ca-cert-bundle"`
OSArch config.OSArch `json:"arch"`
Flavor string `json:"flavor"`
Image string `json:"image"`
@ -141,6 +143,9 @@ type Internal struct {
ControllerID string `json:"controller_id"`
InstanceCallbackURL string `json:"instance_callback_url"`
JWTSecret string `json:"jwt_secret"`
// GithubCredentialsDetails contains all info about the credentials, except the
// token, which is added above.
GithubCredentialsDetails GithubCredentials `json:"gh_creds_details"`
}
type Repository struct {
@ -186,8 +191,12 @@ type ControllerInfo struct {
}
type GithubCredentials struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
BaseURL string `json:"base_url"`
APIBaseURL string `json:"api_base_url"`
UploadBaseURL string `json:"upload_base_url"`
CABundle []byte `json:"ca_bundle,omitempty"`
}
type Provider struct {