Skip to content

Commit

Permalink
Add marketplace options
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Jan 13, 2025
1 parent 1de1923 commit 612085e
Show file tree
Hide file tree
Showing 20 changed files with 421 additions and 109 deletions.
6 changes: 4 additions & 2 deletions apis/installer/v1alpha1/ace_acaas_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,15 @@ type AcaasPlatformSettings struct {
}

type AcaasSettings struct {
CAProviderClass string `json:"caProviderClass"`
AcaasSettingsSecretName `json:"secretName"`
CAProviderClass string `json:"caProviderClass"`
AcaasSettingsSecretName `json:"secretName"`
SpreadsheetCredentialMountPath string `json:"spreadsheetCredentialMountPath"`
}

type AcaasSettingsSecretName struct {
PlatformConfig string `json:"platformConfig"`
Objstore string `json:"objstore"`
Spreadsheet string `json:"spreadsheet"`
}

type AcaasIngress struct {
Expand Down
14 changes: 14 additions & 0 deletions apis/installer/v1alpha1/ace_ace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ type Settings struct {
InboxServer InboxServerSettings `json:"inboxServer"`
Contract ContractStorage `json:"contract"`
Firebase FirebaseSettings `json:"firebase"`
// +optional
Marketplace *MarketplaceSettings `json:"marketplace,omitempty"`
}

type DBSettings struct {
Expand Down Expand Up @@ -403,6 +405,18 @@ type FirebaseSettings struct {
Database string `json:"database"`
}

type MarketplaceSettings struct {
AlertEmails []string `json:"alertEmails"`
SpreadsheetID string `json:"spreadsheetID"`
SpreadsheetCredential string `json:"spreadsheetCredential"`
// /data/marketplace-credentials
SpreadsheetCredentialMountPath string `json:"spreadsheetCredentialMountPath"`

Aws *AceOptionsAwsMarketplace `json:"aws,omitempty"`
Azure *AceOptionsAzureMarketplace `json:"azure,omitempty"`
Gcp *AceOptionsGcpMarketplace `json:"gcp,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// AceList is a list of Aces
Expand Down
11 changes: 3 additions & 8 deletions apis/installer/v1alpha1/ace_marketplace_api_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,9 @@ type MarketplaceApiSpec struct {
Tolerations []core.Toleration `json:"tolerations"`
// If specified, the pod's scheduling constraints
// +optional
Affinity *core.Affinity `json:"affinity"`
Infra AceInfra `json:"infra"`
Settings AcaasSettings `json:"settings"`
Spreadsheet SpreadsheetCred `json:"spreadsheet"`
}

type SpreadsheetCred struct {
Credentials string `json:"credentials"`
Affinity *core.Affinity `json:"affinity"`
Infra AceInfra `json:"infra"`
Settings AcaasSettings `json:"settings"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
29 changes: 29 additions & 0 deletions apis/installer/v1alpha1/ace_options_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ type AceOptionsSettings struct {
DB AceOptionsDBSettings `json:"db"`
Cache AceOptionsCacheSettings `json:"cache"`
SMTP AceOptionsSMTPSettings `json:"smtp"`
// +optional
Marketplace *AceOptionsMarketplace `json:"marketplace,omitempty"`

// DomainWhiteList is an array of domain names that are allowed.
// Each domain should be in the format of a fully qualified domain name,
Expand All @@ -309,6 +311,33 @@ type AceOptionsSettings struct {
LogoutURL string `json:"logoutURL"`
}

type AceOptionsMarketplace struct {
AlertEmails []string `json:"alertEmails"`
SpreadsheetID string `json:"spreadsheetID"`
SpreadsheetCredential string `json:"spreadsheetCredential"`

Aws *AceOptionsAwsMarketplace `json:"aws,omitempty"`
Azure *AceOptionsAzureMarketplace `json:"azure,omitempty"`
Gcp *AceOptionsGcpMarketplace `json:"gcp,omitempty"`
}

type AceOptionsAzureMarketplace struct {
Secret string `json:"secret"`
TenantID string `json:"tenantID"`
ClientID string `json:"clientID"`
ClientSecret string `json:"clientSecret"`
}

type AceOptionsAwsMarketplace struct {
Secret string `json:"secret"`
ProductCode string `json:"productCode"`
}

type AceOptionsGcpMarketplace struct {
Secret string `json:"secret"`
TestUploadID string `json:"testUploadID"`
}

type AceOptionsDBSettings struct {
Persistence PersistenceSpec `json:"persistence"`
Resources core.ResourceRequirements `json:"resources"`
Expand Down
141 changes: 125 additions & 16 deletions apis/installer/v1alpha1/zz_generated.deepcopy.go

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

Loading

0 comments on commit 612085e

Please sign in to comment.