Skip to content

Commit

Permalink
fix: add post install catalog field to cluster (#295)
Browse files Browse the repository at this point in the history
* fix: add post install catalog field to cluster

* fix: add post install catalog field to cluster
  • Loading branch information
CristhianF7 authored Feb 13, 2024
1 parent a3fe4a0 commit 8342c9b
Showing 1 changed file with 33 additions and 32 deletions.
65 changes: 33 additions & 32 deletions internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,38 +284,39 @@ func (clctrl *ClusterController) InitController(def *pkgtypes.ClusterDefinition)

// Write cluster record if it doesn't exist
cl := pkgtypes.Cluster{
ID: primitive.NewObjectID(),
CreationTimestamp: fmt.Sprintf("%v", primitive.NewDateTimeFromTime(time.Now().UTC())),
Status: constants.ClusterStatusProvisioning,
AlertsEmail: clctrl.AlertsEmail,
ClusterName: clctrl.ClusterName,
CloudProvider: clctrl.CloudProvider,
CloudRegion: clctrl.CloudRegion,
DomainName: clctrl.DomainName,
SubdomainName: clctrl.SubdomainName,
DnsProvider: clctrl.DnsProvider,
ClusterID: clctrl.ClusterID,
ECR: clctrl.ECR,
ClusterType: clctrl.ClusterType,
GitopsTemplateURL: clctrl.GitopsTemplateURL,
GitopsTemplateBranch: clctrl.GitopsTemplateBranch,
GitProvider: clctrl.GitProvider,
GitProtocol: clctrl.GitProtocol,
GitHost: clctrl.GitHost,
GitAuth: clctrl.GitAuth,
GitlabOwnerGroupID: clctrl.GitlabOwnerGroupID,
AtlantisWebhookSecret: clctrl.AtlantisWebhookSecret,
AtlantisWebhookURL: clctrl.AtlantisWebhookURL,
KubefirstTeam: clctrl.KubefirstTeam,
AWSAuth: clctrl.AWSAuth,
CivoAuth: clctrl.CivoAuth,
GoogleAuth: clctrl.GoogleAuth,
DigitaloceanAuth: clctrl.DigitaloceanAuth,
VultrAuth: clctrl.VultrAuth,
CloudflareAuth: clctrl.CloudflareAuth,
NodeType: clctrl.NodeType,
NodeCount: clctrl.NodeCount,
LogFileName: def.LogFileName,
ID: primitive.NewObjectID(),
CreationTimestamp: fmt.Sprintf("%v", primitive.NewDateTimeFromTime(time.Now().UTC())),
Status: constants.ClusterStatusProvisioning,
AlertsEmail: clctrl.AlertsEmail,
ClusterName: clctrl.ClusterName,
CloudProvider: clctrl.CloudProvider,
CloudRegion: clctrl.CloudRegion,
DomainName: clctrl.DomainName,
SubdomainName: clctrl.SubdomainName,
DnsProvider: clctrl.DnsProvider,
ClusterID: clctrl.ClusterID,
ECR: clctrl.ECR,
ClusterType: clctrl.ClusterType,
GitopsTemplateURL: clctrl.GitopsTemplateURL,
GitopsTemplateBranch: clctrl.GitopsTemplateBranch,
GitProvider: clctrl.GitProvider,
GitProtocol: clctrl.GitProtocol,
GitHost: clctrl.GitHost,
GitAuth: clctrl.GitAuth,
GitlabOwnerGroupID: clctrl.GitlabOwnerGroupID,
AtlantisWebhookSecret: clctrl.AtlantisWebhookSecret,
AtlantisWebhookURL: clctrl.AtlantisWebhookURL,
KubefirstTeam: clctrl.KubefirstTeam,
AWSAuth: clctrl.AWSAuth,
CivoAuth: clctrl.CivoAuth,
GoogleAuth: clctrl.GoogleAuth,
DigitaloceanAuth: clctrl.DigitaloceanAuth,
VultrAuth: clctrl.VultrAuth,
CloudflareAuth: clctrl.CloudflareAuth,
NodeType: clctrl.NodeType,
NodeCount: clctrl.NodeCount,
LogFileName: def.LogFileName,
PostInstallCatalogApps: clctrl.PostInstallCatalogApps,
}
err = clctrl.MdbCl.InsertCluster(cl)
if err != nil {
Expand Down

0 comments on commit 8342c9b

Please sign in to comment.