Skip to content

Commit 991f2e7

Browse files
Merge branch 'main' into empty-update-count-moved
2 parents fbf903c + bef0403 commit 991f2e7

File tree

15 files changed

+128
-81
lines changed

15 files changed

+128
-81
lines changed

cmd/broker/broker_suite_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@ func (s *BrokerSuiteTest) CreateAPI(cfg *Config, db storage.BrokerStorage, provi
447447
Description: broker.AlicloudPlanName,
448448
Metadata: broker.PlanMetadata{},
449449
},
450+
broker.BuildRuntimeAlicloudPlanID: {
451+
Description: broker.BuildRuntimeAlicloudPlanName,
452+
Metadata: broker.PlanMetadata{},
453+
},
450454
},
451455
},
452456
}

cmd/broker/provisioning_test.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,6 +2799,35 @@ func TestProvisioning_BuildRuntimePlans(t *testing.T) {
27992799
suite.WaitForOperationState(opID, domain.Succeeded)
28002800
suite.AssertRuntimeResourceLabels(opID)
28012801
})
2802+
2803+
t.Run("should provision instance with build-runtime-alicloud plan", func(t *testing.T) {
2804+
// given
2805+
instanceID := uuid.New().String()
2806+
2807+
// when
2808+
resp := suite.CallAPI("PUT", fmt.Sprintf(provisioningRequestPathFormat, instanceID),
2809+
`{
2810+
"service_id": "47c9dcbf-ff30-448e-ab36-d3bad66ba281",
2811+
"plan_id": "72efa867-7b54-4d59-8df7-68f4759ff271",
2812+
"context": {
2813+
"globalaccount_id": "g-account-id",
2814+
"subaccount_id": "sub-id",
2815+
"user_id": "john.smith@email.com"
2816+
},
2817+
"parameters": {
2818+
"name": "build-runtime-alicloud-1",
2819+
"region": "ap-southeast-1"
2820+
}
2821+
}`)
2822+
defer func() { _ = resp.Body.Close() }()
2823+
2824+
opID := suite.DecodeOperationID(resp)
2825+
suite.processKIMProvisioningByOperationID(opID)
2826+
2827+
// then
2828+
suite.WaitForOperationState(opID, domain.Succeeded)
2829+
suite.AssertRuntimeResourceLabels(opID)
2830+
})
28022831
}
28032832

28042833
func TestProvisioning_ResolveSubscriptionSecretStepEnabled(t *testing.T) {

cmd/broker/testdata/hap-rules.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@
1818
- preview # pool: hyperscalerType: aws
1919
- free # pool: hyperscalerType: aws
2020
# pool: hyperscalerType: azure
21-
- alicloud # pool: hyperscalerType: alicloud
21+
- alicloud # pool: hyperscalerType: alicloud
22+
- build-runtime-alicloud # pool: hyperscalerType: alicloud

cmd/broker/testdata/plans.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ azure_lite:
156156
- "Standard_D4_v3"
157157
regions: *azure_regions
158158

159-
alicloud:
159+
alicloud,build-runtime-alicloud:
160+
upgradableToPlans:
161+
- build-runtime-alicloud
160162
volumeSizeGb: 80
161163
regularMachines:
162164
- "ecs.g9i.large"

docs/contributor/02-70-chart-config.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@
2020
| global.images.cloudsql_<br>proxy.tag | - | `2.11.3-sap` |
2121
| global.images.container_<br>registry.path | - | `europe-docker.pkg.dev/kyma-project/prod` |
2222
| global.images.kyma_environment_<br>broker.dir | - | None |
23-
| global.images.kyma_environment_<br>broker.version | - | `1.25.39` |
23+
| global.images.kyma_environment_<br>broker.version | - | `1.25.40` |
2424
| global.images.kyma_environment_<br>broker_schema_migrator.<br>dir | - | None |
25-
| global.images.kyma_environment_<br>broker_schema_migrator.<br>version | - | `1.25.39` |
25+
| global.images.kyma_environment_<br>broker_schema_migrator.<br>version | - | `1.25.40` |
2626
| global.images.kyma_environments_<br>subaccount_cleanup_job.<br>dir | - | None |
27-
| global.images.kyma_environments_<br>subaccount_cleanup_job.<br>version | - | `1.25.39` |
27+
| global.images.kyma_environments_<br>subaccount_cleanup_job.<br>version | - | `1.25.40` |
2828
| global.images.kyma_environment_<br>expirator_job.dir | - | None |
29-
| global.images.kyma_environment_<br>expirator_job.<br>version | - | `1.25.39` |
29+
| global.images.kyma_environment_<br>expirator_job.<br>version | - | `1.25.40` |
3030
| global.images.kyma_environment_<br>deprovision_retrigger_<br>job.dir | - | None |
31-
| global.images.kyma_environment_<br>deprovision_retrigger_<br>job.version | - | `1.25.39` |
31+
| global.images.kyma_environment_<br>deprovision_retrigger_<br>job.version | - | `1.25.40` |
3232
| global.images.kyma_environment_<br>runtime_reconciler.<br>dir | - | None |
33-
| global.images.kyma_environment_<br>runtime_reconciler.<br>version | - | `1.25.39` |
33+
| global.images.kyma_environment_<br>runtime_reconciler.<br>version | - | `1.25.40` |
3434
| global.images.kyma_environment_<br>subaccount_sync.dir | - | None |
35-
| global.images.kyma_environment_<br>subaccount_sync.<br>version | - | `1.25.39` |
35+
| global.images.kyma_environment_<br>subaccount_sync.<br>version | - | `1.25.40` |
3636
| global.images.kyma_environment_<br>globalaccounts.dir | - | None |
37-
| global.images.kyma_environment_<br>globalaccounts.<br>version | - | `1.25.39` |
37+
| global.images.kyma_environment_<br>globalaccounts.<br>version | - | `1.25.40` |
3838
| global.images.kyma_environment_<br>service_binding_cleanup_<br>job.dir | - | None |
39-
| global.images.kyma_environment_<br>service_binding_cleanup_<br>job.version | - | `1.25.39` |
39+
| global.images.kyma_environment_<br>service_binding_cleanup_<br>job.version | - | `1.25.40` |
4040
| global.ingress.<br>domainName | - | `localhost` |
4141
| global.istio.gateway | - | `kyma-system/kyma-gateway` |
4242
| global.istio.proxy.<br>port | - | `15020` |

docs/user/03-10-service-description.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ There is also an experimental `preview` plan:
2828
> ### Caution:
2929
> The experimental plan may fail to work or be removed.
3030
31-
The `alicloud` plan is disabled by default and is not intended for use.
31+
The `alicloud` and `build-runtime-alicloud` plans are disabled by default and are not intended for use.
3232

33-
| Plan name | Plan ID | Description |
34-
|-----------|----------------------------------------|------------------------------------------------|
35-
| `alicloud`| `9f2c3b4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d` | Installs Kyma runtime in the Alicloud cluster. |
33+
| Plan name | Plan ID | Description |
34+
|--------------------------|----------------------------------------|-----------------------------------------------------|
35+
| `alicloud` | `9f2c3b4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d` | Installs Kyma runtime in the Alibaba Cloud cluster. |
36+
| `build-runtime-alicloud` | `72efa867-7b54-4d59-8df7-68f4759ff271` | Installs Kyma runtime in the Alibaba Cloud cluster. |
3637

3738
## Provisioning Parameters
3839

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ require (
3434
golang.org/x/time v0.14.0
3535
gopkg.in/yaml.v3 v3.0.1
3636
helm.sh/helm/v3 v3.20.0
37-
k8s.io/api v0.35.0
37+
k8s.io/api v0.35.1
3838
k8s.io/apiextensions-apiserver v0.35.0
39-
k8s.io/apimachinery v0.35.0
39+
k8s.io/apimachinery v0.35.1
4040
k8s.io/client-go v0.35.0
4141
k8s.io/kubectl v0.35.0
4242
sigs.k8s.io/controller-runtime v0.23.1

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,12 +626,12 @@ istio.io/api v1.27.5 h1:y3zH7S97PKtbqK4Ch0/Tr7eLR8p/HQFsE+efbFZh6PI=
626626
istio.io/api v1.27.5/go.mod h1:DTVGH6CLXj5W8FF9JUD3Tis78iRgT1WeuAnxfTz21Wg=
627627
istio.io/client-go v1.27.2 h1:4IsF7UAdV5Yg0iq6ONyWZpjFr3z2ahkIbLWyzOHCAwA=
628628
istio.io/client-go v1.27.2/go.mod h1:zgT5R1USl6rwYK1eb2kisPuiji05TQJE7CQHU253iAg=
629-
k8s.io/api v0.35.0 h1:iBAU5LTyBI9vw3L5glmat1njFK34srdLmktWwLTprlY=
630-
k8s.io/api v0.35.0/go.mod h1:AQ0SNTzm4ZAczM03QH42c7l3bih1TbAXYo0DkF8ktnA=
629+
k8s.io/api v0.35.1 h1:0PO/1FhlK/EQNVK5+txc4FuhQibV25VLSdLMmGpDE/Q=
630+
k8s.io/api v0.35.1/go.mod h1:28uR9xlXWml9eT0uaGo6y71xK86JBELShLy4wR1XtxM=
631631
k8s.io/apiextensions-apiserver v0.35.0 h1:3xHk2rTOdWXXJM+RDQZJvdx0yEOgC0FgQ1PlJatA5T4=
632632
k8s.io/apiextensions-apiserver v0.35.0/go.mod h1:E1Ahk9SADaLQ4qtzYFkwUqusXTcaV2uw3l14aqpL2LU=
633-
k8s.io/apimachinery v0.35.0 h1:Z2L3IHvPVv/MJ7xRxHEtk6GoJElaAqDCCU0S6ncYok8=
634-
k8s.io/apimachinery v0.35.0/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns=
633+
k8s.io/apimachinery v0.35.1 h1:yxO6gV555P1YV0SANtnTjXYfiivaTPvCTKX6w6qdDsU=
634+
k8s.io/apimachinery v0.35.1/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns=
635635
k8s.io/autoscaler/vertical-pod-autoscaler v1.5.1 h1:LlVtM3IKqIVHz1ZXC3ahe/mAtDWb7Eob0tyTzqFULqg=
636636
k8s.io/autoscaler/vertical-pod-autoscaler v1.5.1/go.mod h1:znhUnV0Yn+CkZu3TZ2HVqd8GFRMkPj/CXszX1gdBjTU=
637637
k8s.io/client-go v0.35.0 h1:IAW0ifFbfQQwQmga0UdoH0yvdqrbwMdq9vIFEhRpxBE=

internal/broker/plans.go

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,48 @@ import (
99
)
1010

1111
const (
12-
GCPPlanID = "ca6e5357-707f-4565-bbbd-b3ab732597c6"
13-
GCPPlanName = "gcp"
14-
AWSPlanID = "361c511f-f939-4621-b228-d0fb79a1fe15"
15-
AWSPlanName = "aws"
16-
AzurePlanID = "4deee563-e5ec-4731-b9b1-53b42d855f0c"
17-
AzurePlanName = "azure"
18-
AzureLitePlanID = "8cb22518-aa26-44c5-91a0-e669ec9bf443"
19-
AzureLitePlanName = "azure_lite"
20-
TrialPlanID = "7d55d31d-35ae-4438-bf13-6ffdfa107d9f"
21-
TrialPlanName = "trial"
22-
SapConvergedCloudPlanID = "03b812ac-c991-4528-b5bd-08b303523a63"
23-
SapConvergedCloudPlanName = "sap-converged-cloud"
24-
FreemiumPlanID = "b1a5764e-2ea1-4f95-94c0-2b4538b37b55"
25-
FreemiumPlanName = "free"
26-
PreviewPlanID = "5cb3d976-b85c-42ea-a636-79cadda109a9"
27-
PreviewPlanName = "preview"
28-
BuildRuntimeAWSPlanID = "6aae0ff3-89f7-4f12-86de-51466145422e"
29-
BuildRuntimeAWSPlanName = "build-runtime-aws"
30-
BuildRuntimeGCPPlanID = "a310cd6b-6452-45a0-935d-d24ab53f9eba"
31-
BuildRuntimeGCPPlanName = "build-runtime-gcp"
32-
BuildRuntimeAzurePlanID = "499244b4-1bef-48c9-be68-495269899f8e"
33-
BuildRuntimeAzurePlanName = "build-runtime-azure"
34-
AlicloudPlanID = "9f2c3b4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
35-
AlicloudPlanName = "alicloud"
12+
GCPPlanID = "ca6e5357-707f-4565-bbbd-b3ab732597c6"
13+
GCPPlanName = "gcp"
14+
AWSPlanID = "361c511f-f939-4621-b228-d0fb79a1fe15"
15+
AWSPlanName = "aws"
16+
AzurePlanID = "4deee563-e5ec-4731-b9b1-53b42d855f0c"
17+
AzurePlanName = "azure"
18+
AzureLitePlanID = "8cb22518-aa26-44c5-91a0-e669ec9bf443"
19+
AzureLitePlanName = "azure_lite"
20+
TrialPlanID = "7d55d31d-35ae-4438-bf13-6ffdfa107d9f"
21+
TrialPlanName = "trial"
22+
SapConvergedCloudPlanID = "03b812ac-c991-4528-b5bd-08b303523a63"
23+
SapConvergedCloudPlanName = "sap-converged-cloud"
24+
FreemiumPlanID = "b1a5764e-2ea1-4f95-94c0-2b4538b37b55"
25+
FreemiumPlanName = "free"
26+
PreviewPlanID = "5cb3d976-b85c-42ea-a636-79cadda109a9"
27+
PreviewPlanName = "preview"
28+
BuildRuntimeAWSPlanID = "6aae0ff3-89f7-4f12-86de-51466145422e"
29+
BuildRuntimeAWSPlanName = "build-runtime-aws"
30+
BuildRuntimeGCPPlanID = "a310cd6b-6452-45a0-935d-d24ab53f9eba"
31+
BuildRuntimeGCPPlanName = "build-runtime-gcp"
32+
BuildRuntimeAzurePlanID = "499244b4-1bef-48c9-be68-495269899f8e"
33+
BuildRuntimeAzurePlanName = "build-runtime-azure"
34+
AlicloudPlanID = "9f2c3b4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
35+
AlicloudPlanName = "alicloud"
36+
BuildRuntimeAlicloudPlanID = "72efa867-7b54-4d59-8df7-68f4759ff271"
37+
BuildRuntimeAlicloudPlanName = "build-runtime-alicloud"
3638
)
3739

3840
var PlanIDsMapping = map[PlanNameType]PlanIDType{
39-
AzurePlanName: AzurePlanID,
40-
AWSPlanName: AWSPlanID,
41-
AzureLitePlanName: AzureLitePlanID,
42-
GCPPlanName: GCPPlanID,
43-
TrialPlanName: TrialPlanID,
44-
SapConvergedCloudPlanName: SapConvergedCloudPlanID,
45-
FreemiumPlanName: FreemiumPlanID,
46-
PreviewPlanName: PreviewPlanID,
47-
BuildRuntimeAWSPlanName: BuildRuntimeAWSPlanID,
48-
BuildRuntimeGCPPlanName: BuildRuntimeGCPPlanID,
49-
BuildRuntimeAzurePlanName: BuildRuntimeAzurePlanID,
50-
AlicloudPlanName: AlicloudPlanID,
41+
AzurePlanName: AzurePlanID,
42+
AWSPlanName: AWSPlanID,
43+
AzureLitePlanName: AzureLitePlanID,
44+
GCPPlanName: GCPPlanID,
45+
TrialPlanName: TrialPlanID,
46+
SapConvergedCloudPlanName: SapConvergedCloudPlanID,
47+
FreemiumPlanName: FreemiumPlanID,
48+
PreviewPlanName: PreviewPlanID,
49+
BuildRuntimeAWSPlanName: BuildRuntimeAWSPlanID,
50+
BuildRuntimeGCPPlanName: BuildRuntimeGCPPlanID,
51+
BuildRuntimeAzurePlanName: BuildRuntimeAzurePlanID,
52+
AlicloudPlanName: AlicloudPlanID,
53+
BuildRuntimeAlicloudPlanName: BuildRuntimeAlicloudPlanID,
5154
}
5255

5356
type PlanIDType string

internal/broker/schemas.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (s *SchemaService) Validate() error {
4141
provider = pkg.Azure
4242
case SapConvergedCloudPlanName:
4343
provider = pkg.SapConvergedCloud
44-
case AlicloudPlanName:
44+
case AlicloudPlanName, BuildRuntimeAlicloudPlanName:
4545
provider = pkg.Alicloud
4646
default:
4747
continue
@@ -87,6 +87,9 @@ func (s *SchemaService) Plans(plans PlansConfig, platformRegion string, cp pkg.C
8787
if createSchema, updateSchema, available := s.BuildRuntimeAzureSchemas(platformRegion); available {
8888
outputPlans[BuildRuntimeAzurePlanID] = s.defaultServicePlan(BuildRuntimeAzurePlanID, BuildRuntimeAzurePlanName, plans, createSchema, updateSchema)
8989
}
90+
if createSchema, updateSchema, available := s.BuildRuntimeAlicloudSchemas(platformRegion); available {
91+
outputPlans[BuildRuntimeAlicloudPlanID] = s.defaultServicePlan(BuildRuntimeAlicloudPlanID, BuildRuntimeAlicloudPlanName, plans, createSchema, updateSchema)
92+
}
9093
if azureLiteCreateSchema, azureLiteUpdateSchema, available := s.AzureLiteSchemas(platformRegion); available {
9194
outputPlans[AzureLitePlanID] = s.defaultServicePlan(AzureLitePlanID, AzureLitePlanName, plans, azureLiteCreateSchema, azureLiteUpdateSchema)
9295
}
@@ -206,6 +209,10 @@ func (s *SchemaService) AlicloudSchemas(platformRegion string) (create, update *
206209
return s.planSchemas(pkg.Alicloud, AlicloudPlanName, platformRegion)
207210
}
208211

212+
func (s *SchemaService) BuildRuntimeAlicloudSchemas(platformRegion string) (create, update *map[string]interface{}, available bool) {
213+
return s.planSchemas(pkg.Alicloud, BuildRuntimeAlicloudPlanName, platformRegion)
214+
}
215+
209216
func (s *SchemaService) AzureLiteSchema(platformRegion string, regions []string, update bool) *map[string]interface{} {
210217
flags := s.createFlags(AzureLitePlanName)
211218
machines := s.planSpec.RegularMachines(AzureLitePlanName)

0 commit comments

Comments
 (0)