Skip to content

Commit

Permalink
Cadence packaged provisioning was refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
testisnullus committed Feb 28, 2024
1 parent 285d710 commit 14e0905
Show file tree
Hide file tree
Showing 16 changed files with 827 additions and 668 deletions.
295 changes: 279 additions & 16 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,276 @@
}
],
"results": {
".git/rebase-apply/0001": [
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "9df9bec25cf43c12784340a3d61a679bda635dbe",
"is_verified": false,
"line_number": 42
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "9df9bec25cf43c12784340a3d61a679bda635dbe",
"is_verified": false,
"line_number": 42
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "a5242ee14ecedb34fc707f9a9d50ea2e49bf3bf4",
"is_verified": false,
"line_number": 50
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "a5242ee14ecedb34fc707f9a9d50ea2e49bf3bf4",
"is_verified": false,
"line_number": 50
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "28e25209711fcb05bff721aa2c65cac06c4b1a27",
"is_verified": false,
"line_number": 59
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "28e25209711fcb05bff721aa2c65cac06c4b1a27",
"is_verified": false,
"line_number": 59
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "54e61709d58ce12ffe6fe12e46e7db7fdddd1410",
"is_verified": false,
"line_number": 68
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "54e61709d58ce12ffe6fe12e46e7db7fdddd1410",
"is_verified": false,
"line_number": 68
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "ab96546b597931357b75cba986d783a9b3498aa0",
"is_verified": false,
"line_number": 77
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "ab96546b597931357b75cba986d783a9b3498aa0",
"is_verified": false,
"line_number": 77
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "e3427d54a54f1050bd8a94391034cbbcc2ff06f0",
"is_verified": false,
"line_number": 88
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "e3427d54a54f1050bd8a94391034cbbcc2ff06f0",
"is_verified": false,
"line_number": 88
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "30605bfe6b9a82cbc21d16736c907faffb250aa1",
"is_verified": false,
"line_number": 95
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "30605bfe6b9a82cbc21d16736c907faffb250aa1",
"is_verified": false,
"line_number": 95
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "9718449ab965b52c8c40ce526f7b2c86b6d25b22",
"is_verified": false,
"line_number": 96
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "9718449ab965b52c8c40ce526f7b2c86b6d25b22",
"is_verified": false,
"line_number": 96
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "353e8061f2befecb6818ba0c034c632fb0bcae1b",
"is_verified": false,
"line_number": 118
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "353e8061f2befecb6818ba0c034c632fb0bcae1b",
"is_verified": false,
"line_number": 118
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "2d8ca9a11a2e2ef6931d0f0ef52b1896114a4558",
"is_verified": false,
"line_number": 1609
}
],
".git/rebase-apply/patch": [
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "9df9bec25cf43c12784340a3d61a679bda635dbe",
"is_verified": false,
"line_number": 18
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "9df9bec25cf43c12784340a3d61a679bda635dbe",
"is_verified": false,
"line_number": 18
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "a5242ee14ecedb34fc707f9a9d50ea2e49bf3bf4",
"is_verified": false,
"line_number": 26
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "a5242ee14ecedb34fc707f9a9d50ea2e49bf3bf4",
"is_verified": false,
"line_number": 26
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "28e25209711fcb05bff721aa2c65cac06c4b1a27",
"is_verified": false,
"line_number": 35
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "28e25209711fcb05bff721aa2c65cac06c4b1a27",
"is_verified": false,
"line_number": 35
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "54e61709d58ce12ffe6fe12e46e7db7fdddd1410",
"is_verified": false,
"line_number": 44
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "54e61709d58ce12ffe6fe12e46e7db7fdddd1410",
"is_verified": false,
"line_number": 44
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "ab96546b597931357b75cba986d783a9b3498aa0",
"is_verified": false,
"line_number": 53
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "ab96546b597931357b75cba986d783a9b3498aa0",
"is_verified": false,
"line_number": 53
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "e3427d54a54f1050bd8a94391034cbbcc2ff06f0",
"is_verified": false,
"line_number": 64
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "e3427d54a54f1050bd8a94391034cbbcc2ff06f0",
"is_verified": false,
"line_number": 64
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "30605bfe6b9a82cbc21d16736c907faffb250aa1",
"is_verified": false,
"line_number": 71
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "30605bfe6b9a82cbc21d16736c907faffb250aa1",
"is_verified": false,
"line_number": 71
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "9718449ab965b52c8c40ce526f7b2c86b6d25b22",
"is_verified": false,
"line_number": 72
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "9718449ab965b52c8c40ce526f7b2c86b6d25b22",
"is_verified": false,
"line_number": 72
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "353e8061f2befecb6818ba0c034c632fb0bcae1b",
"is_verified": false,
"line_number": 94
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "353e8061f2befecb6818ba0c034c632fb0bcae1b",
"is_verified": false,
"line_number": 94
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "2d8ca9a11a2e2ef6931d0f0ef52b1896114a4558",
"is_verified": false,
"line_number": 1585
}
],
"apis/clusterresources/v1beta1/cassandrauser_types.go": [
{
"type": "Secret Keyword",
Expand Down Expand Up @@ -165,14 +435,14 @@
"filename": "apis/clusters/v1beta1/cadence_types.go",
"hashed_secret": "a242f4a16b957f7ff99eb24e189e94d270d2348b",
"is_verified": false,
"line_number": 291
"line_number": 292
},
{
"type": "Secret Keyword",
"filename": "apis/clusters/v1beta1/cadence_types.go",
"hashed_secret": "a57ce131bd944bdf8ba2f2f93e179dc416ed0315",
"is_verified": false,
"line_number": 300
"line_number": 301
}
],
"apis/clusters/v1beta1/cassandra_types.go": [
Expand Down Expand Up @@ -204,7 +474,7 @@
"filename": "apis/clusters/v1beta1/cassandra_webhook.go",
"hashed_secret": "e0a46b27231f798fe22dc4d5d82b5feeb5dcf085",
"is_verified": false,
"line_number": 236
"line_number": 232
}
],
"apis/clusters/v1beta1/kafka_types.go": [
Expand Down Expand Up @@ -356,7 +626,7 @@
"filename": "apis/clusters/v1beta1/zz_generated.deepcopy.go",
"hashed_secret": "44e17306b837162269a410204daaa5ecee4ec22c",
"is_verified": false,
"line_number": 665
"line_number": 676
}
],
"apis/kafkamanagement/v1beta1/kafkauser_types.go": [
Expand Down Expand Up @@ -495,16 +765,9 @@
{
"type": "Secret Keyword",
"filename": "controllers/clusters/cadence_controller.go",
"hashed_secret": "bcf196cdeea4d7ed8b04dcbbd40111eb5e9abeac",
"is_verified": false,
"line_number": 644
},
{
"type": "Secret Keyword",
"filename": "controllers/clusters/cadence_controller.go",
"hashed_secret": "192d703e91a60432ce06bfe26adfd12f5c7b931f",
"hashed_secret": "5ffe533b830f08a0326348a9160afafc8ada44db",
"is_verified": false,
"line_number": 677
"line_number": 755
}
],
"controllers/clusters/datatest/kafka_v1beta1.yaml": [
Expand All @@ -531,14 +794,14 @@
"filename": "controllers/clusters/helpers.go",
"hashed_secret": "5ffe533b830f08a0326348a9160afafc8ada44db",
"is_verified": false,
"line_number": 119
"line_number": 122
},
{
"type": "Secret Keyword",
"filename": "controllers/clusters/helpers.go",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 124
"line_number": 127
}
],
"controllers/clusters/kafkaconnect_controller_test.go": [
Expand Down Expand Up @@ -1128,5 +1391,5 @@
}
]
},
"generated_at": "2024-02-28T14:20:52Z"
"generated_at": "2024-02-28T16:24:46Z"
}
22 changes: 16 additions & 6 deletions apis/clusters/v1beta1/cadence_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ type AWSArchival struct {
}

type PackagedProvisioning struct {
UseAdvancedVisibility bool `json:"useAdvancedVisibility"`
BundledKafkaSpec *BundledKafkaSpec `json:"bundledKafkaSpec,omitempty"`
BundledOpenSearchSpec *BundledOpenSearchSpec `json:"bundledOpenSearchSpec,omitempty"`
BundledCassandraSpec *BundledCassandraSpec `json:"bundledCassandraSpec"`
UseAdvancedVisibility bool `json:"useAdvancedVisibility"`

// +kubebuilder:validation:Enum=Developer;Production-Starter;Production-Small
SolutionSize string `json:"solutionSize"`
}

type SharedProvisioning struct {
Expand All @@ -131,8 +131,9 @@ type AdvancedVisibility struct {
type CadenceStatus struct {
GenericStatus `json:",inline"`

DataCentres []*CadenceDataCentreStatus `json:"dataCentres,omitempty"`
TargetSecondaryCadence []*CadenceDependencyTarget `json:"targetSecondaryCadence,omitempty"`
PackagedProvisioningClusterRefs []*Reference `json:"packagedProvisioningClusterRefs,omitempty"`
DataCentres []*CadenceDataCentreStatus `json:"dataCentres,omitempty"`
TargetSecondaryCadence []*CadenceDependencyTarget `json:"targetSecondaryCadence,omitempty"`
}

type CadenceDataCentreStatus struct {
Expand Down Expand Up @@ -580,3 +581,12 @@ func (cdc *CadenceDataCentreStatus) Equals(o *CadenceDataCentreStatus) bool {
cdc.PrivateLink.Equal(o.PrivateLink) &&
nodesEqual(cdc.Nodes, o.Nodes)
}

func (c *CadenceSpec) CalculateNodeSize(cloudProvider, solution, app string) string {
if appSizes, ok := models.SolutionSizesMap[cloudProvider]; ok {
if solutionMap, ok := appSizes[app]; ok {
return solutionMap[solution]
}
}
return ""
}
Loading

0 comments on commit 14e0905

Please sign in to comment.