Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #57 from caos/v0.9.15
Browse files Browse the repository at this point in the history
V0.9.15
  • Loading branch information
stebenz authored Feb 10, 2020
2 parents 1c92327 + 1194000 commit 52dc977
Show file tree
Hide file tree
Showing 52 changed files with 1,868 additions and 204 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ tools
/*.go
!main.go

examples/gitops/privatrepo/secret
examples/gitops/privatrepo/secret

local/*
10 changes: 2 additions & 8 deletions api/v1beta1/ambassador.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ type Ambassador struct {
Deploy bool `json:"deploy,omitempty"`
ReplicaCount int `json:"replicaCount,omitempty"`
Service *AmbassadorService `json:"service,omitempty"`
Hosts *Hosts `json:"hosts,omitempty" yaml:"hosts,omitempty"`
}

type AmbassadorService struct {
Expand All @@ -20,13 +19,8 @@ type Port struct {
NodePort uint16 `json:"nodePort,omitempty" yaml:"nodePort,omitempty"`
}

type Hosts struct {
Argocd *Host `json:"argocd"`
Grafana *Host `json:"grafana"`
}

type Host struct {
type Network struct {
Domain string `json:"domain" yaml:"domain"`
Email string `json:"email" yaml:"email"`
Email string `json:"email,omitempty" yaml:"email,omitempty"`
AcmeAuthority string `json:"acmeAuthority,omitempty" yaml:"acmeAuthority,omitempty"`
}
108 changes: 101 additions & 7 deletions api/v1beta1/argocd.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,105 @@
package v1beta1

type Argocd struct {
Deploy bool `json:"deploy,omitempty"`
CustomImageWithGopass bool `json:"customImageWithGopass,omitempty" yaml:"customImageWithGopass,omitempty"`
ImagePullSecret string `json:"imagePullSecret,omitempty" yaml:"imagePullSecret,omitempty"`
GopassGPGKey string `json:"gopassGPGKey,omitempty" yaml:"gopassGPGKey,omitempty"`
GopassSSHKey string `json:"gopassSSHKey,omitempty" yaml:"gopassSSHKey,omitempty"`
GopassDirectory string `json:"gopassDirectory,omitempty" yaml:"gopassDirectory,omitempty"`
GopassStoreName string `json:"gopassStoreName,omitempty" yaml:"gopassStoreName,omitempty"`
Deploy bool `json:"deploy,omitempty"`
CustomImage *ArgocdCustomImage `json:"customImage,omitempty" yaml:"customImage,omitempty"`
Network *Network `json:"network,omitempty" yaml:"network,omitempty"`
Auth *ArgocdAuth `json:"auth,omitempty" yaml:"auth,omitempty"`
Repositories []*ArgocdRepository `json:"repositories,omitempty" yaml:"repositories,omitempty"`
}

type ArgocdRepository struct {
URL string `json:"url,omitempty" yaml:"url,omitempty"`
UsernameSecret *ArgocdSecret `json:"usernameSecret,omitempty" yaml:"usernameSecret,omitempty"`
PasswordSecret *ArgocdSecret `json:"passwordSecret,omitempty" yaml:"passwordSecret,omitempty"`
CertificateSecret *ArgocdSecret `json:"certificateSecret,omitempty" yaml:"certificateSecret,omitempty"`
}

type ArgocdSecret struct {
Name string `json:"name" yaml:"name"`
Key string `json:"key" yaml:"key"`
}

type ArgocdCustomImage struct {
Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
ImagePullSecret string `json:"imagePullSecret,omitempty" yaml:"imagePullSecret,omitempty"`
GopassGPGKey string `json:"gopassGPGKey,omitempty" yaml:"gopassGPGKey,omitempty"`
GopassSSHKey string `json:"gopassSSHKey,omitempty" yaml:"gopassSSHKey,omitempty"`
GopassDirectory string `json:"gopassDirectory,omitempty" yaml:"gopassDirectory,omitempty"`
GopassStoreName string `json:"gopassStoreName,omitempty" yaml:"gopassStoreName,omitempty"`
}

type ArgocdAuth struct {
OIDC *ArgocdOIDC `json:"oidc,omitempty" yaml:"oidc,omitempty"`
GithubConnector *ArgocdGithubConnector `json:"github,omitempty" yaml:"github,omitempty"`
GitlabConnector *ArgocdGitlabConnector `json:"gitlab,omitempty" yaml:"gitlab,omitempty"`
GoogleConnector *ArgocdGoogleConnector `json:"google,omitempty" yaml:"google,omitempty"`
}

type ArgocdOIDC struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"`
SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
ClientIDKey string `json:"clientIDKey,omitempty" yaml:"clientIDKey,omitempty"`
ClientSecretKey string `json:"clientSecretKey,omitempty" yaml:"clientSecret,omitempty"`
RequestedScopes []string `json:"requestedScopes,omitempty" yaml:"requestedScopes,omitempty"`
RequestedIDTokenClaims map[string]*ArgocdClaim `json:"requestedIDTokenClaims,omitempty" yaml:"requestedIDTokenClaims,omitempty"`
}

type ArgocdClaim struct {
Essential bool `json:"essential,omitempty" yaml:"essential,omitempty"`
Values []string `json:"values,omitempty" yaml:"values,omitempty"`
}

type ArgocdGithubConnector struct {
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Config *ArgocdGithubConfig `json:"config,omitempty" yaml:"config,omitempty"`
}

type ArgocdGithubConfig struct {
SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
ClientIDKey string `json:"clientIDKey,omitempty" yaml:"clientIDKey,omitempty"`
ClientSecretKey string `json:"clientSecretKey,omitempty" yaml:"clientSecretKey,omitempty"`
Orgs []*ArgocdGithubOrg `json:"orgs,omitempty" yaml:"orgs,omitempty"`
LoadAllGroups bool `json:"loadAllGroups,omitempty" yaml:"loadAllGroups,omitempty"`
TeamNameField string `json:"teamNameField,omitempty" yaml:"teamNameField,omitempty"`
UseLoginAsID bool `json:"useLoginAsID,omitempty" yaml:"useLoginAsID,omitempty"`
}

type ArgocdGithubOrg struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Teams []string `json:"teams,omitempty" yaml:"teams,omitempty"`
}

type ArgocdGitlabConnector struct {
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Config *ArgocdGitlabConfig `json:"config,omitempty" yaml:"config,omitempty"`
}

type ArgocdGitlabConfig struct {
SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
ClientIDKey string `json:"clientIDKey,omitempty" yaml:"clientIDKey,omitempty"`
ClientSecretKey string `json:"clientSecretKey,omitempty" yaml:"clientSecretKey,omitempty"`
BaseURL string `json:"baseURL,omitempty" yaml:"baseURL,omitempty"`
Groups []string `json:"groups,omitempty" yaml:"groups,omitempty"`
UseLoginAsID bool `json:"useLoginAsID,omitempty" yaml:"useLoginAsID,omitempty"`
}

type ArgocdGoogleConnector struct {
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Config *ArgocdGoogleConfig `json:"config,omitempty" yaml:"config,omitempty"`
}

type ArgocdGoogleConfig struct {
SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
ClientIDKey string `json:"clientIDKey,omitempty" yaml:"clientIDKey,omitempty"`
ClientSecretKey string `json:"clientSecretKey,omitempty" yaml:"clientSecretKey,omitempty"`
HostedDomains []string `json:"hostedDomains,omitempty" yaml:"hostedDomains,omitempty"`
Groups []string `json:"groups,omitempty" yaml:"groups,omitempty"`
ServiceAccountJSONKey string `json:"serviceAccountJSONKey,omitempty" yaml:"serviceAccountJSONKey,omitempty"`
ServiceAccountFilePath string `json:"serviceAccountFilePath,omitempty" yaml:"serviceAccountFilePath,omitempty"`
AdminEmail string `json:"adminEmail,omitempty" yaml:"adminEmail,omitempty"`
}
63 changes: 53 additions & 10 deletions api/v1beta1/grafana.go
Original file line number Diff line number Diff line change
@@ -1,27 +1,70 @@
package v1beta1

type Grafana struct {
Deploy bool `json:"deploy,omitempty"`
Admin *Admin `json:"admin,omitempty"`
Datasources []*Datasource `json:"datasources,omitempty"`
DashboardProviders []*Provider `json:"dashboardproviders,omitempty"`
Storage *StorageSpec `json:"storage,omitempty"`
Deploy bool `json:"deploy,omitempty" yaml:"deploy,omitempty"`
Admin *Admin `json:"admin,omitempty" yaml:"admin,omitempty"`
Datasources []*Datasource `json:"datasources,omitempty" yaml:"datasources,omitempty"`
DashboardProviders []*Provider `json:"dashboardproviders,omitempty" yaml:"dashboardproviders,omitempty"`
Storage *StorageSpec `json:"storage,omitempty" yaml:"storage,omitempty"`
Network *Network `json:"network,omitempty" yaml:"network,omitempty"`
Auth *GrafanaAuth `json:"auth,omitempty" yaml:"auth,omitempty"`
}

type Admin struct {
ExistingSecret string `json:"existingSecret,omitempty" yaml:"existingSecret,omitempty"`
UserKey string `json:"userKey,omitempty" yaml:"userKey,omitempty"`
PasswordKey string `json:"passwordKey,omitempty" yaml:"passwordKey,omitempty"`
}

type Datasource struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Url string `json:"url,omitempty"`
Access string `json:"access,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
Url string `json:"url,omitempty" yaml:"url,omitempty"`
Access string `json:"access,omitempty" yaml:"access,omitempty"`
IsDefault bool `json:"isDefault,omitempty" yaml:"isDefault,omitempty"`
}

type Provider struct {
ConfigMaps []string `json:"configMaps,omitempty" yaml:"configMaps,omitempty"`
Folder string `json:"folder,omitempty"`
Folder string `json:"folder,omitempty" yaml:"folder,omitempty"`
}

type GrafanaAuth struct {
Google *GrafanaGoogleAuth `json:"google,omitempty" yaml:"google,omitempty"`
Github *GrafanaGithubAuth `json:"github,omitempty" yaml:"github,omitempty"`
Gitlab *GrafanaGitlabAuth `json:"gitlab,omitempty" yaml:"gitlab,omitempty"`
GenericOAuth *GrafanaGenericOAuth `json:"genericOAuth,omitempty" yaml:"genericOAuth,omitempty"`
}

type GrafanaGoogleAuth struct {
SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
ClientIDKey string `json:"clientIDKey,omitempty" yaml:"clientIDKey,omitempty"`
ClientSecretKey string `json:"clientSecretKey,omitempty" yaml:"clientSecretKey,omitempty"`
AllowedDomains []string `json:"allowedDomains,omitempty" yaml:"allowedDomains,omitempty"`
}

type GrafanaGithubAuth struct {
SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
ClientIDKey string `json:"clientIDKey,omitempty" yaml:"clientIDKey,omitempty"`
ClientSecretKey string `json:"clientSecretKey,omitempty" yaml:"clientSecretKey,omitempty"`
AllowedOrganizations []string `json:"allowedOrganizations,omitempty" yaml:"allowedOrganizations,omitempty"`
TeamIDs []string `json:"teamIDs,omitempty" yaml:"teamIDs,omitempty"`
}

type GrafanaGitlabAuth struct {
SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
ClientIDKey string `json:"clientIDKey,omitempty" yaml:"clientIDKey,omitempty"`
ClientSecretKey string `json:"clientSecretKey,omitempty" yaml:"clientSecretKey,omitempty"`
AllowedGroups []string `json:"allowedGroups,omitempty" yaml:"allowedGroups,omitempty"`
}

type GrafanaGenericOAuth struct {
SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
ClientIDKey string `json:"clientIDKey,omitempty" yaml:"clientIDKey,omitempty"`
ClientSecretKey string `json:"clientSecret,omitempty" yaml:"clientSecretKey,omitempty"`
Scopes []string `json:"scopes,omitempty" yaml:"scopes,omitempty"`
AuthURL string `json:"authURL,omitempty" yaml:"authURL,omitempty"`
TokenURL string `json:"tokenURL,omitempty" yaml:"tokenURL,omitempty"`
APIURL string `json:"apiURL,omitempty" yaml:"apiURL,omitempty"`
AllowedDomains []string `json:"allowedDomains,omitempty" yaml:"allowedDomains,omitempty"`
}
Loading

0 comments on commit 52dc977

Please sign in to comment.