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 27, 2024
1 parent 13f37bd commit e9c66ee
Show file tree
Hide file tree
Showing 13 changed files with 781 additions and 661 deletions.
271 changes: 253 additions & 18 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,248 @@
}
],
"results": {
".git/rebase-apply/0001": [
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "28e25209711fcb05bff721aa2c65cac06c4b1a27",
"is_verified": false,
"line_number": 40
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "28e25209711fcb05bff721aa2c65cac06c4b1a27",
"is_verified": false,
"line_number": 40
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "9718449ab965b52c8c40ce526f7b2c86b6d25b22",
"is_verified": false,
"line_number": 49
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "9718449ab965b52c8c40ce526f7b2c86b6d25b22",
"is_verified": false,
"line_number": 49
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "09517e863c23af7b5e8588737ce8a46323819dd9",
"is_verified": false,
"line_number": 57
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "09517e863c23af7b5e8588737ce8a46323819dd9",
"is_verified": false,
"line_number": 57
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "a5242ee14ecedb34fc707f9a9d50ea2e49bf3bf4",
"is_verified": false,
"line_number": 65
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "a5242ee14ecedb34fc707f9a9d50ea2e49bf3bf4",
"is_verified": false,
"line_number": 65
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "54e61709d58ce12ffe6fe12e46e7db7fdddd1410",
"is_verified": false,
"line_number": 74
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "54e61709d58ce12ffe6fe12e46e7db7fdddd1410",
"is_verified": false,
"line_number": 74
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "ab96546b597931357b75cba986d783a9b3498aa0",
"is_verified": false,
"line_number": 83
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "ab96546b597931357b75cba986d783a9b3498aa0",
"is_verified": false,
"line_number": 83
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "e3427d54a54f1050bd8a94391034cbbcc2ff06f0",
"is_verified": false,
"line_number": 94
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "e3427d54a54f1050bd8a94391034cbbcc2ff06f0",
"is_verified": false,
"line_number": 94
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "30605bfe6b9a82cbc21d16736c907faffb250aa1",
"is_verified": false,
"line_number": 101
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "30605bfe6b9a82cbc21d16736c907faffb250aa1",
"is_verified": false,
"line_number": 101
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/0001",
"hashed_secret": "2d8ca9a11a2e2ef6931d0f0ef52b1896114a4558",
"is_verified": false,
"line_number": 1517
}
],
".git/rebase-apply/patch": [
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "28e25209711fcb05bff721aa2c65cac06c4b1a27",
"is_verified": false,
"line_number": 18
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "28e25209711fcb05bff721aa2c65cac06c4b1a27",
"is_verified": false,
"line_number": 18
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "9718449ab965b52c8c40ce526f7b2c86b6d25b22",
"is_verified": false,
"line_number": 27
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "9718449ab965b52c8c40ce526f7b2c86b6d25b22",
"is_verified": false,
"line_number": 27
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "09517e863c23af7b5e8588737ce8a46323819dd9",
"is_verified": false,
"line_number": 35
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "09517e863c23af7b5e8588737ce8a46323819dd9",
"is_verified": false,
"line_number": 35
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "a5242ee14ecedb34fc707f9a9d50ea2e49bf3bf4",
"is_verified": false,
"line_number": 43
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "a5242ee14ecedb34fc707f9a9d50ea2e49bf3bf4",
"is_verified": false,
"line_number": 43
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "54e61709d58ce12ffe6fe12e46e7db7fdddd1410",
"is_verified": false,
"line_number": 52
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "54e61709d58ce12ffe6fe12e46e7db7fdddd1410",
"is_verified": false,
"line_number": 52
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "ab96546b597931357b75cba986d783a9b3498aa0",
"is_verified": false,
"line_number": 61
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "ab96546b597931357b75cba986d783a9b3498aa0",
"is_verified": false,
"line_number": 61
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "e3427d54a54f1050bd8a94391034cbbcc2ff06f0",
"is_verified": false,
"line_number": 72
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "e3427d54a54f1050bd8a94391034cbbcc2ff06f0",
"is_verified": false,
"line_number": 72
},
{
"type": "Hex High Entropy String",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "30605bfe6b9a82cbc21d16736c907faffb250aa1",
"is_verified": false,
"line_number": 79
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "30605bfe6b9a82cbc21d16736c907faffb250aa1",
"is_verified": false,
"line_number": 79
},
{
"type": "Secret Keyword",
"filename": ".git/rebase-apply/patch",
"hashed_secret": "2d8ca9a11a2e2ef6931d0f0ef52b1896114a4558",
"is_verified": false,
"line_number": 1495
}
],
"apis/clusterresources/v1beta1/cassandrauser_types.go": [
{
"type": "Secret Keyword",
Expand Down Expand Up @@ -169,14 +411,14 @@
"filename": "apis/clusters/v1beta1/cadence_types.go",
"hashed_secret": "a242f4a16b957f7ff99eb24e189e94d270d2348b",
"is_verified": false,
"line_number": 292
"line_number": 291
},
{
"type": "Secret Keyword",
"filename": "apis/clusters/v1beta1/cadence_types.go",
"hashed_secret": "a57ce131bd944bdf8ba2f2f93e179dc416ed0315",
"is_verified": false,
"line_number": 301
"line_number": 300
}
],
"apis/clusters/v1beta1/cassandra_types.go": [
Expand Down Expand Up @@ -208,7 +450,7 @@
"filename": "apis/clusters/v1beta1/cassandra_webhook.go",
"hashed_secret": "e0a46b27231f798fe22dc4d5d82b5feeb5dcf085",
"is_verified": false,
"line_number": 235
"line_number": 232
}
],
"apis/clusters/v1beta1/kafka_types.go": [
Expand Down Expand Up @@ -365,7 +607,7 @@
"filename": "apis/clusters/v1beta1/redis_webhook.go",
"hashed_secret": "bc1c5ae5fd4a238d86261f422e62c489de408c22",
"is_verified": false,
"line_number": 322
"line_number": 323
}
],
"apis/clusters/v1beta1/zookeeper_types.go": [
Expand All @@ -374,14 +616,14 @@
"filename": "apis/clusters/v1beta1/zookeeper_types.go",
"hashed_secret": "5ffe533b830f08a0326348a9160afafc8ada44db",
"is_verified": false,
"line_number": 235
"line_number": 232
},
{
"type": "Secret Keyword",
"filename": "apis/clusters/v1beta1/zookeeper_types.go",
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
"is_verified": false,
"line_number": 240
"line_number": 237
}
],
"apis/clusters/v1beta1/zz_generated.deepcopy.go": [
Expand All @@ -390,7 +632,7 @@
"filename": "apis/clusters/v1beta1/zz_generated.deepcopy.go",
"hashed_secret": "44e17306b837162269a410204daaa5ecee4ec22c",
"is_verified": false,
"line_number": 1316
"line_number": 1327
}
],
"apis/kafkamanagement/v1beta1/kafkauser_types.go": [
Expand Down Expand Up @@ -529,16 +771,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": 759
}
],
"controllers/clusters/datatest/kafka_v1beta1.yaml": [
Expand Down Expand Up @@ -574,7 +809,7 @@
"filename": "controllers/clusters/postgresql_controller.go",
"hashed_secret": "5ffe533b830f08a0326348a9160afafc8ada44db",
"is_verified": false,
"line_number": 1272
"line_number": 1265
}
],
"controllers/clusters/zookeeper_controller_test.go": [
Expand Down Expand Up @@ -1146,5 +1381,5 @@
}
]
},
"generated_at": "2024-02-26T10:23:28Z"
"generated_at": "2024-02-27T11:13:52Z"
}
20 changes: 14 additions & 6 deletions apis/clusters/v1beta1/cadence_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ 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"`
SolutionSize string `json:"solutionSize"`
}

type SharedProvisioning struct {
Expand All @@ -131,8 +129,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 @@ -569,3 +568,12 @@ func (cdc *CadenceDataCentreStatus) Equals(o *CadenceDataCentreStatus) bool {
nodesEqual(cdc.Nodes, o.Nodes) &&
cdc.NumberOfNodes == o.NumberOfNodes
}

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 e9c66ee

Please sign in to comment.