From 1a7a898ad55f663eb03076081921b5e9d94a01f2 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Tue, 3 Oct 2023 21:23:37 -0700 Subject: [PATCH] Add 'manual' provisioning to containers (#6423) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description This change adds 'manual' provisioning mode to containers, this means that a container can have the setting `resourceProvisioning: 'manual'` which means that Radius won't create any resources. This also includes the ability to specify `resources: ...` to denote the existing resources associated with the container. This will be used by the new Kubernetes integration that needs to *track* the existance of a container without deploying it. ## Type of change - This pull request adds or changes features of Radius and has an approved issue (issue link required). ## Auto-generated summary ### ๐Ÿค– Generated by Copilot at fce2fbf ### Summary ๐Ÿณ๐Ÿ› ๏ธ๐Ÿงช This pull request adds support for manual resource provisioning for containers in the radius project. It introduces new fields, types, and schemas to the `v20231001preview` API version, the `datamodel` package, and the `typespec` folder. It also updates the `corerp` package, the `swagger` specification, and the test files to handle the new feature. It adds conditional logic to the `handlers` and `renderers` packages to skip creating or rendering resources that are manually provisioned. > _To manage containers with ease_ > _We added some new fields and keys_ > _`resourceProvisioning` and `resources`_ > _Are part of the `ContainerProperties`_ > _And they help us reference and create with APIs_ ### Walkthrough * Add support for manual resource provisioning for containers ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-c019a02a8a768b2eec23949592ff1e7b5a167de082059261b3c3372e2870dacaL136-R139),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-c019a02a8a768b2eec23949592ff1e7b5a167de082059261b3c3372e2870dacaL261-R267),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-c019a02a8a768b2eec23949592ff1e7b5a167de082059261b3c3372e2870dacaR555-R589),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbR59-R63),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbR87-R93),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbL121-R149),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbL165-R183),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-fe08aa1da384f35b2b045ae14ccfeef240b4feb9f65363e29c882a9b1718845eL1-R16),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-d98390d94414de84ab52d6bd92ff16d9a6643ca92e366d025a07d9c3b3e63e4aL1-R35),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-07cd8284519deaa5e625f1fe393cb48bdd1cc621c9a4656ca43cc6049dfe7962R68-R87),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-21034b9d798fa570ecae4b7d54142c7f94d9d0f1b39c5f45f0c4c859674b19fbR303-R308),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-21034b9d798fa570ecae4b7d54142c7f94d9d0f1b39c5f45f0c4c859674b19fbR381-R386),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-21034b9d798fa570ecae4b7d54142c7f94d9d0f1b39c5f45f0c4c859674b19fbR1387-R1392),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9R624-R625),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9R661-R666),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9R803-R804),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9R836-R841),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9R3274-R3300),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-5275155acd7f7a59f0301cfc95f8dd38f72f22795e3197c6a150bae13dd5d5f3L74-R80),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-5275155acd7f7a59f0301cfc95f8dd38f72f22795e3197c6a150bae13dd5d5f3R138-R141),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-033dc8a7c9b970cc30f7420ce8cf2f12a26258b276779683ba3f761c481bf0a7R81-R86),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-3da981bf20df07918a646eafcd867d6c95abac1f3aef1ed1b50a29f3f4cc8636R36),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-3da981bf20df07918a646eafcd867d6c95abac1f3aef1ed1b50a29f3f4cc8636R169-R183),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-3da981bf20df07918a646eafcd867d6c95abac1f3aef1ed1b50a29f3f4cc8636L204),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-6f1219f263ab06a1493ac76960e2ab8cbe647e83e926bff7d13988f393334f94R25),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-6f1219f263ab06a1493ac76960e2ab8cbe647e83e926bff7d13988f393334f94R401-R435),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-a2ffa8fdf3e7cacf68f61fdc82a345456a27dd04bb95d914b1194454b00d1c0aR81-R85),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-99efabd56bb5d297b7f40c7c9958b4b11139710d7149e713ab6ac662d1546cb4R75-R79),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68R2953-R2963),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68R3015-R3038),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68R3091-R3101),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68R4637-R4649),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-2f8e96d0546ae7b99ee68e516a354825696d77ca06e49bb6f82ab1caaa778522L65-R83)) * Add new fields `ResourceProvisioning` and `Resources` to the `ContainerProperties` and `ContainerResourceUpdateProperties` structs in the `v20231001preview` and `datamodel` packages ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-c019a02a8a768b2eec23949592ff1e7b5a167de082059261b3c3372e2870dacaL136-R139),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-c019a02a8a768b2eec23949592ff1e7b5a167de082059261b3c3372e2870dacaL261-R267),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-21034b9d798fa570ecae4b7d54142c7f94d9d0f1b39c5f45f0c4c859674b19fbR303-R308),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-21034b9d798fa570ecae4b7d54142c7f94d9d0f1b39c5f45f0c4c859674b19fbR381-R386),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-5275155acd7f7a59f0301cfc95f8dd38f72f22795e3197c6a150bae13dd5d5f3L74-R80)) * Add new type `ContainerResourceProvisioning` as an enum that specifies how the container resource is managed in the `v20231001preview` package and the `typespec` folder ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-07cd8284519deaa5e625f1fe393cb48bdd1cc621c9a4656ca43cc6049dfe7962R68-R87),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-2f8e96d0546ae7b99ee68e516a354825696d77ca06e49bb6f82ab1caaa778522L65-R83)) * Add new type `ResourceReference` as a struct that describes a reference to an existing resource in the `v20231001preview` and `datamodel` packages and the `swagger` folder ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-21034b9d798fa570ecae4b7d54142c7f94d9d0f1b39c5f45f0c4c859674b19fbR1387-R1392),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-5275155acd7f7a59f0301cfc95f8dd38f72f22795e3197c6a150bae13dd5d5f3R138-R141),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68R4637-R4649)) * Add new helper functions to convert between the `ResourceReference` and `ContainerResourceProvisioning` types in the `v20231001preview` and `datamodel` packages ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-c019a02a8a768b2eec23949592ff1e7b5a167de082059261b3c3372e2870dacaR555-R589)) * Add new test cases to the `TestContainerConvertVersionedToDataModel` and `TestContainerConvertDataModelToVersioned` functions in the `container_conversion_test.go` file using the `containerresource-manual.json` and `containerresourcedatamodel-manual.json` files as test inputs ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbR59-R63),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbR87-R93),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbL121-R149),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbL165-R183),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-fe08aa1da384f35b2b045ae14ccfeef240b4feb9f65363e29c882a9b1718845eL1-R16),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-d98390d94414de84ab52d6bd92ff16d9a6643ca92e366d025a07d9c3b3e63e4aL1-R35)) * Add JSON marshalling and unmarshalling logic for the `ResourceProvisioning` and `Resources` fields in the `zz_generated_models_serde.go` file ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9R624-R625),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9R661-R666),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9R803-R804),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9R836-R841),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9R3274-R3300)) * Add new properties `resourceProvisioning` and `resources` to the `ContainerProperties` and `ContainerResourceUpdateProperties` schemas in the `openapi.json` file and reference the `ContainerResourceProvisioning` and `ResourceReference` schemas ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68R2953-R2963),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68R3015-R3038),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68R3091-R3101)) * Add new function `Test_Render_Manual` to the `render_test.go` file in the `container` package to test the `Render` function with a container resource with manual provisioning and a resource reference ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-6f1219f263ab06a1493ac76960e2ab8cbe647e83e926bff7d13988f393334f94R25),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-6f1219f263ab06a1493ac76960e2ab8cbe647e83e926bff7d13988f393334f94R401-R435)) * Modify the `Render` function in the `render.go` file in the `container` package to populate the `outputResources` variable with the `Resources` field in the `ContainerProperties` struct and skip the creation of the container resource if the `ResourceProvisioning` field is `manual` ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-3da981bf20df07918a646eafcd867d6c95abac1f3aef1ed1b50a29f3f4cc8636R36),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-3da981bf20df07918a646eafcd867d6c95abac1f3aef1ed1b50a29f3f4cc8636R169-R183),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-3da981bf20df07918a646eafcd867d6c95abac1f3aef1ed1b50a29f3f4cc8636L204)) * Modify the `Render` function in the `kubernetes.go` file in the `handlers` package to return an empty map of computed values and no error if the `CreateResource` field in the `RenderOptions` struct is nil ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-033dc8a7c9b970cc30f7420ce8cf2f12a26258b276779683ba3f761c481bf0a7R81-R86)) * Modify the `Render` function in the `renderer.go` file in the `daprextension` package and the `render.go` file in the `kubernetesmetadata` package to skip the iteration and continue with the next output resource if the `CreateResource` field in the `OutputResource` struct is nil ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-a2ffa8fdf3e7cacf68f61fdc82a345456a27dd04bb95d914b1194454b00d1c0aR81-R85),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-99efabd56bb5d297b7f40c7c9958b4b11139710d7149e713ab6ac662d1546cb4R75-R79)) * Refactor the test code in the `container_conversion_test.go` file ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbR124),[link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbL154-R177)) * Remove the `emptyExt` field from the test cases in the `TestContainerConvertDataModelToVersioned` function as it is no longer needed ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbR124)) * Replace the `r` variable with the `versioned` variable in the `TestContainerConvertDataModelToVersioned` function for clarity ([link](https://github.com/radius-project/radius/pull/6423/files?diff=unified&w=0#diff-4183e8fa58766ff3187ebf888b8266b181dd6b4f11a23debac68833bde480edbL154-R177)) --- .../2023-10-01-preview/types.json | 2 +- .../2023-10-01-preview/types.md | 6 ++ hack/bicep-types-radius/generated/index.json | 2 +- .../v20231001preview/container_conversion.go | 66 ++++++++++++++++--- .../container_conversion_test.go | 34 +++++++--- .../environment_conversion.go | 2 +- .../v20231001preview/extender_conversion.go | 2 +- .../v20231001preview/gateway_conversion.go | 2 +- .../v20231001preview/httproute_conversion.go | 2 +- .../secretstore_conversion.go | 2 +- .../testdata/containerresource-manual.json | 17 +++++ .../containerresourcedatamodel-manual.json | 36 ++++++++++ pkg/corerp/api/v20231001preview/util.go | 4 +- .../api/v20231001preview/volume_conversion.go | 2 +- .../zz_generated_constants.go | 20 ++++++ .../v20231001preview/zz_generated_models.go | 18 +++++ .../zz_generated_models_serde.go | 43 ++++++++++++ pkg/corerp/datamodel/container.go | 27 ++++++-- pkg/corerp/handlers/kubernetes.go | 6 ++ pkg/corerp/renderers/container/render.go | 16 ++++- pkg/corerp/renderers/container/render_test.go | 35 ++++++++++ .../renderers/daprextension/renderer.go | 5 ++ .../renderers/kubernetesmetadata/render.go | 5 ++ .../preview/2023-10-01-preview/openapi.json | 59 +++++++++++++++++ typespec/Applications.Core/containers.tsp | 15 +++++ 25 files changed, 395 insertions(+), 33 deletions(-) create mode 100644 pkg/corerp/api/v20231001preview/testdata/containerresource-manual.json create mode 100644 pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel-manual.json diff --git a/hack/bicep-types-radius/generated/applications/applications.core/2023-10-01-preview/types.json b/hack/bicep-types-radius/generated/applications/applications.core/2023-10-01-preview/types.json index 69fc323dbe..5c0e88e2aa 100644 --- a/hack/bicep-types-radius/generated/applications/applications.core/2023-10-01-preview/types.json +++ b/hack/bicep-types-radius/generated/applications/applications.core/2023-10-01-preview/types.json @@ -1 +1 @@ -[{"1":{"Kind":1}},{"1":{"Kind":2}},{"1":{"Kind":3}},{"1":{"Kind":4}},{"1":{"Kind":5}},{"1":{"Kind":6}},{"1":{"Kind":7}},{"1":{"Kind":8}},{"6":{"Value":"Applications.Core/applications"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/applications","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":8,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":9,"Flags":10,"Description":"The resource api version"},"properties":{"Type":11,"Flags":0,"Description":"Application properties"},"tags":{"Type":45,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"ApplicationProperties","Properties":{"provisioningState":{"Type":19,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"environment":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to"},"extensions":{"Type":34,"Flags":0,"Description":"The application extension."},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[12,13,14,15,16,17,18]}},{"7":{"Name":"Extension","Discriminator":"kind","BaseProperties":{},"Elements":{"daprSidecar":21,"kubernetesMetadata":26,"kubernetesNamespace":30,"manualScaling":32}}},{"2":{"Name":"DaprSidecarExtension","Properties":{"appPort":{"Type":3,"Flags":0,"Description":"The Dapr appPort. Specifies the internal listening port for the application to handle requests from the Dapr sidecar."},"appId":{"Type":4,"Flags":1,"Description":"The Dapr appId. Specifies the identifier used by Dapr for service invocation."},"config":{"Type":4,"Flags":0,"Description":"Specifies the Dapr configuration to use for the resource."},"protocol":{"Type":24,"Flags":0,"Description":"The Dapr sidecar extension protocol"},"kind":{"Type":25,"Flags":1,"Description":"Discriminator property for Extension."}}}},{"6":{"Value":"http"}},{"6":{"Value":"grpc"}},{"5":{"Elements":[22,23]}},{"6":{"Value":"daprSidecar"}},{"2":{"Name":"KubernetesMetadataExtension","Properties":{"annotations":{"Type":27,"Flags":0,"Description":"Annotations to be applied to the Kubernetes resources output by the resource"},"labels":{"Type":28,"Flags":0,"Description":"Labels to be applied to the Kubernetes resources output by the resource"},"kind":{"Type":29,"Flags":1,"Description":"Discriminator property for Extension."}}}},{"2":{"Name":"KubernetesMetadataExtensionAnnotations","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"KubernetesMetadataExtensionLabels","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"kubernetesMetadata"}},{"2":{"Name":"KubernetesNamespaceExtension","Properties":{"namespace":{"Type":4,"Flags":1,"Description":"The namespace of the application environment."},"kind":{"Type":31,"Flags":1,"Description":"Discriminator property for Extension."}}}},{"6":{"Value":"kubernetesNamespace"}},{"2":{"Name":"ManualScalingExtension","Properties":{"replicas":{"Type":3,"Flags":1,"Description":"Replica count."},"kind":{"Type":33,"Flags":1,"Description":"Discriminator property for Extension."}}}},{"6":{"Value":"manualScaling"}},{"3":{"ItemType":20}},{"2":{"Name":"ResourceStatus","Properties":{"compute":{"Type":36,"Flags":0,"Description":"Represents backing compute resource"},"outputResources":{"Type":44,"Flags":0,"Description":"Properties of an output resource"}}}},{"7":{"Name":"EnvironmentCompute","Discriminator":"kind","BaseProperties":{"resourceId":{"Type":4,"Flags":0,"Description":"The resource id of the compute resource for application environment."},"identity":{"Type":37,"Flags":0,"Description":"IdentitySettings is the external identity setting."}},"Elements":{"kubernetes":41}}},{"2":{"Name":"IdentitySettings","Properties":{"kind":{"Type":40,"Flags":1,"Description":"IdentitySettingKind is the kind of supported external identity setting"},"oidcIssuer":{"Type":4,"Flags":0,"Description":"The URI for your compute platform's OIDC issuer"},"resource":{"Type":4,"Flags":0,"Description":"The resource ID of the provisioned identity"}}}},{"6":{"Value":"undefined"}},{"6":{"Value":"azure.com.workload"}},{"5":{"Elements":[38,39]}},{"2":{"Name":"KubernetesCompute","Properties":{"namespace":{"Type":4,"Flags":1,"Description":"The namespace to use for the environment."},"kind":{"Type":42,"Flags":1,"Description":"Discriminator property for EnvironmentCompute."}}}},{"6":{"Value":"kubernetes"}},{"2":{"Name":"OutputResource","Properties":{"localId":{"Type":4,"Flags":0,"Description":"The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency relationship. LocalIDs do not have any particular format or meaning beyond being compared to determine dependency relationships."},"id":{"Type":4,"Flags":0,"Description":"The UCP resource ID of the underlying resource."},"radiusManaged":{"Type":2,"Flags":0,"Description":"Determines whether Radius manages the lifecycle of the underlying resource."}}}},{"3":{"ItemType":43}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"SystemData","Properties":{"createdBy":{"Type":4,"Flags":0,"Description":"The identity that created the resource."},"createdByType":{"Type":51,"Flags":0,"Description":"The type of identity that created the resource."},"createdAt":{"Type":4,"Flags":0,"Description":"The timestamp of resource creation (UTC)."},"lastModifiedBy":{"Type":4,"Flags":0,"Description":"The identity that last modified the resource."},"lastModifiedByType":{"Type":56,"Flags":0,"Description":"The type of identity that created the resource."},"lastModifiedAt":{"Type":4,"Flags":0,"Description":"The timestamp of resource last modification (UTC)"}}}},{"6":{"Value":"User"}},{"6":{"Value":"Application"}},{"6":{"Value":"ManagedIdentity"}},{"6":{"Value":"Key"}},{"5":{"Elements":[47,48,49,50]}},{"6":{"Value":"User"}},{"6":{"Value":"Application"}},{"6":{"Value":"ManagedIdentity"}},{"6":{"Value":"Key"}},{"5":{"Elements":[52,53,54,55]}},{"4":{"Name":"Applications.Core/applications@2023-10-01-preview","ScopeType":0,"Body":10}},{"6":{"Value":"Applications.Core/containers"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/containers","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":58,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":59,"Flags":10,"Description":"The resource api version"},"properties":{"Type":61,"Flags":0,"Description":"Container properties"},"tags":{"Type":112,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"ContainerProperties","Properties":{"environment":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to (if applicable)"},"application":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by"},"provisioningState":{"Type":69,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."},"container":{"Type":70,"Flags":1,"Description":"Definition of a container"},"connections":{"Type":107,"Flags":0,"Description":"Specifies a connection to another resource."},"identity":{"Type":37,"Flags":0,"Description":"IdentitySettings is the external identity setting."},"extensions":{"Type":108,"Flags":0,"Description":"Extensions spec of the resource"},"runtimes":{"Type":109,"Flags":0,"Description":"The properties for runtime configuration"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[62,63,64,65,66,67,68]}},{"2":{"Name":"Container","Properties":{"image":{"Type":4,"Flags":1,"Description":"The registry and image to download and run in your container"},"imagePullPolicy":{"Type":74,"Flags":0,"Description":"The image pull policy for the container"},"env":{"Type":75,"Flags":0,"Description":"environment"},"ports":{"Type":80,"Flags":0,"Description":"container ports"},"readinessProbe":{"Type":81,"Flags":0,"Description":"Properties for readiness/liveness probe"},"livenessProbe":{"Type":81,"Flags":0,"Description":"Properties for readiness/liveness probe"},"volumes":{"Type":100,"Flags":0,"Description":"container volumes"},"command":{"Type":101,"Flags":0,"Description":"Entrypoint array. Overrides the container image's ENTRYPOINT"},"args":{"Type":102,"Flags":0,"Description":"Arguments to the entrypoint. Overrides the container image's CMD"},"workingDir":{"Type":4,"Flags":0,"Description":"Working directory for the container"}}}},{"6":{"Value":"Always"}},{"6":{"Value":"IfNotPresent"}},{"6":{"Value":"Never"}},{"5":{"Elements":[71,72,73]}},{"2":{"Name":"ContainerEnv","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"ContainerPortProperties","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"protocol":{"Type":79,"Flags":0,"Description":"The protocol in use by the port"},"provides":{"Type":4,"Flags":0,"Description":"Specifies a route provided by this port"},"scheme":{"Type":4,"Flags":0,"Description":"Specifies the URL scheme of the communication protocol. Consumers can use the scheme to construct a URL. The value defaults to 'http' or 'https' depending on the port value"},"port":{"Type":3,"Flags":0,"Description":"Specifies the port that will be exposed by this container. Must be set when value different from containerPort is desired"}}}},{"6":{"Value":"TCP"}},{"6":{"Value":"UDP"}},{"5":{"Elements":[77,78]}},{"2":{"Name":"ContainerPorts","Properties":{},"AdditionalProperties":76}},{"7":{"Name":"HealthProbeProperties","Discriminator":"kind","BaseProperties":{"initialDelaySeconds":{"Type":3,"Flags":0,"Description":"Initial delay in seconds before probing for readiness/liveness"},"failureThreshold":{"Type":3,"Flags":0,"Description":"Threshold number of times the probe fails after which a failure would be reported"},"periodSeconds":{"Type":3,"Flags":0,"Description":"Interval for the readiness/liveness probe in seconds"},"timeoutSeconds":{"Type":3,"Flags":0,"Description":"Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds"}},"Elements":{"exec":82,"httpGet":84,"tcp":87}}},{"2":{"Name":"ExecHealthProbeProperties","Properties":{"command":{"Type":4,"Flags":1,"Description":"Command to execute to probe readiness/liveness"},"kind":{"Type":83,"Flags":1,"Description":"Discriminator property for HealthProbeProperties."}}}},{"6":{"Value":"exec"}},{"2":{"Name":"HttpGetHealthProbeProperties","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"path":{"Type":4,"Flags":1,"Description":"The route to make the HTTP request on"},"headers":{"Type":85,"Flags":0,"Description":"Custom HTTP headers to add to the get request"},"kind":{"Type":86,"Flags":1,"Description":"Discriminator property for HealthProbeProperties."}}}},{"2":{"Name":"HttpGetHealthProbePropertiesHeaders","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"httpGet"}},{"2":{"Name":"TcpHealthProbeProperties","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"kind":{"Type":88,"Flags":1,"Description":"Discriminator property for HealthProbeProperties."}}}},{"6":{"Value":"tcp"}},{"7":{"Name":"Volume","Discriminator":"kind","BaseProperties":{"mountPath":{"Type":4,"Flags":0,"Description":"The path where the volume is mounted"}},"Elements":{"ephemeral":90,"persistent":95}}},{"2":{"Name":"EphemeralVolume","Properties":{"managedStore":{"Type":93,"Flags":1,"Description":"The managed store for the ephemeral volume"},"kind":{"Type":94,"Flags":1,"Description":"Discriminator property for Volume."}}}},{"6":{"Value":"memory"}},{"6":{"Value":"disk"}},{"5":{"Elements":[91,92]}},{"6":{"Value":"ephemeral"}},{"2":{"Name":"PersistentVolume","Properties":{"permission":{"Type":98,"Flags":0,"Description":"The persistent volume permission"},"source":{"Type":4,"Flags":1,"Description":"The source of the volume"},"kind":{"Type":99,"Flags":1,"Description":"Discriminator property for Volume."}}}},{"6":{"Value":"read"}},{"6":{"Value":"write"}},{"5":{"Elements":[96,97]}},{"6":{"Value":"persistent"}},{"2":{"Name":"ContainerVolumes","Properties":{},"AdditionalProperties":89}},{"3":{"ItemType":4}},{"3":{"ItemType":4}},{"2":{"Name":"ConnectionProperties","Properties":{"source":{"Type":4,"Flags":1,"Description":"The source of the connection"},"disableDefaultEnvVars":{"Type":2,"Flags":0,"Description":"default environment variable override"},"iam":{"Type":104,"Flags":0,"Description":"IAM properties"}}}},{"2":{"Name":"IamProperties","Properties":{"kind":{"Type":105,"Flags":1,"Description":"The kind of IAM provider to configure"},"roles":{"Type":106,"Flags":0,"Description":"RBAC permissions to be assigned on the source resource"}}}},{"6":{"Value":"azure"}},{"3":{"ItemType":4}},{"2":{"Name":"ContainerPropertiesConnections","Properties":{},"AdditionalProperties":103}},{"3":{"ItemType":20}},{"2":{"Name":"RuntimesProperties","Properties":{"kubernetes":{"Type":110,"Flags":0,"Description":"The runtime configuration properties for Kubernetes"}}}},{"2":{"Name":"KubernetesRuntimeProperties","Properties":{"base":{"Type":4,"Flags":0,"Description":"The serialized YAML manifest which represents the base Kubernetes resources to deploy, such as Deployment, Service, ServiceAccount, Secrets, and ConfigMaps."},"pod":{"Type":111,"Flags":0,"Description":"A strategic merge patch that will be applied to the PodSpec object when this container is being deployed."}}}},{"2":{"Name":"KubernetesPodSpec","Properties":{},"AdditionalProperties":0}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/containers@2023-10-01-preview","ScopeType":0,"Body":60}},{"6":{"Value":"Applications.Core/environments"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/environments","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":114,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":115,"Flags":10,"Description":"The resource api version"},"properties":{"Type":117,"Flags":0,"Description":"Environment properties"},"tags":{"Type":137,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"EnvironmentProperties","Properties":{"provisioningState":{"Type":125,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"compute":{"Type":36,"Flags":1,"Description":"Represents backing compute resource"},"providers":{"Type":126,"Flags":0,"Description":"The Cloud providers configuration"},"recipes":{"Type":135,"Flags":0,"Description":"Specifies Recipes linked to the Environment."},"extensions":{"Type":136,"Flags":0,"Description":"The environment extension."}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[118,119,120,121,122,123,124]}},{"2":{"Name":"Providers","Properties":{"azure":{"Type":127,"Flags":0,"Description":"The Azure cloud provider definition"},"aws":{"Type":128,"Flags":0,"Description":"The AWS cloud provider definition"}}}},{"2":{"Name":"ProvidersAzure","Properties":{"scope":{"Type":4,"Flags":1,"Description":"Target scope for Azure resources to be deployed into. For example: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup'"}}}},{"2":{"Name":"ProvidersAws","Properties":{"scope":{"Type":4,"Flags":1,"Description":"Target scope for AWS resources to be deployed into. For example: '/planes/aws/aws/accounts/000000000000/regions/us-west-2'"}}}},{"7":{"Name":"RecipeProperties","Discriminator":"templateKind","BaseProperties":{"templatePath":{"Type":4,"Flags":1,"Description":"Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported."},"parameters":{"Type":0,"Flags":0,"Description":"Any object"}},"Elements":{"bicep":130,"terraform":132}}},{"2":{"Name":"BicepRecipeProperties","Properties":{"templateKind":{"Type":131,"Flags":1,"Description":"Discriminator property for RecipeProperties."}}}},{"6":{"Value":"bicep"}},{"2":{"Name":"TerraformRecipeProperties","Properties":{"templateVersion":{"Type":4,"Flags":0,"Description":"Version of the template to deploy. For Terraform recipes using a module registry this is required, but must be omitted for other module sources."},"templateKind":{"Type":133,"Flags":1,"Description":"Discriminator property for RecipeProperties."}}}},{"6":{"Value":"terraform"}},{"2":{"Name":"DictionaryOfRecipeProperties","Properties":{},"AdditionalProperties":129}},{"2":{"Name":"EnvironmentPropertiesRecipes","Properties":{},"AdditionalProperties":134}},{"3":{"ItemType":20}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/environments@2023-10-01-preview","ScopeType":0,"Body":116}},{"6":{"Value":"Applications.Core/extenders"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/extenders","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":139,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":140,"Flags":10,"Description":"The resource api version"},"properties":{"Type":142,"Flags":0,"Description":"ExtenderResource portable resource properties"},"tags":{"Type":155,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"ExtenderProperties","Properties":{"environment":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to"},"application":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by (if applicable)"},"provisioningState":{"Type":150,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."},"secrets":{"Type":0,"Flags":0,"Description":"Any object"},"recipe":{"Type":151,"Flags":0,"Description":"The recipe used to automatically deploy underlying infrastructure for a portable resource"},"resourceProvisioning":{"Type":154,"Flags":0,"Description":"Specifies how the underlying service/resource is provisioned and managed. Available values are 'recipe', where Radius manages the lifecycle of the resource through a Recipe, and 'manual', where a user manages the resource and provides the values."}},"AdditionalProperties":0}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[143,144,145,146,147,148,149]}},{"2":{"Name":"Recipe","Properties":{"name":{"Type":4,"Flags":1,"Description":"The name of the recipe within the environment to use"},"parameters":{"Type":0,"Flags":0,"Description":"Any object"}}}},{"6":{"Value":"recipe"}},{"6":{"Value":"manual"}},{"5":{"Elements":[152,153]}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/extenders@2023-10-01-preview","ScopeType":0,"Body":141}},{"6":{"Value":"Applications.Core/gateways"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/gateways","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":157,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":158,"Flags":10,"Description":"The resource api version"},"properties":{"Type":160,"Flags":0,"Description":"Gateway properties"},"tags":{"Type":176,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"GatewayProperties","Properties":{"environment":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to (if applicable)"},"application":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by"},"provisioningState":{"Type":168,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."},"internal":{"Type":2,"Flags":0,"Description":"Sets Gateway to not be exposed externally (no public IP address associated). Defaults to false (exposed to internet)."},"hostname":{"Type":169,"Flags":0,"Description":"Declare hostname information for the Gateway. Leaving the hostname empty auto-assigns one: mygateway.myapp.PUBLICHOSTNAMEORIP.nip.io."},"routes":{"Type":171,"Flags":1,"Description":"Routes attached to this Gateway"},"tls":{"Type":172,"Flags":0,"Description":"TLS configuration definition for Gateway resource."},"url":{"Type":4,"Flags":2,"Description":"URL of the gateway resource. Readonly"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[161,162,163,164,165,166,167]}},{"2":{"Name":"GatewayHostname","Properties":{"prefix":{"Type":4,"Flags":0,"Description":"Specify a prefix for the hostname: myhostname.myapp.PUBLICHOSTNAMEORIP.nip.io. Mutually exclusive with 'fullyQualifiedHostname' and will be overridden if both are defined."},"fullyQualifiedHostname":{"Type":4,"Flags":0,"Description":"Specify a fully-qualified domain name: myapp.mydomain.com. Mutually exclusive with 'prefix' and will take priority if both are defined."}}}},{"2":{"Name":"GatewayRoute","Properties":{"path":{"Type":4,"Flags":0,"Description":"The path to match the incoming request path on. Ex - /myservice."},"destination":{"Type":4,"Flags":0,"Description":"The HttpRoute to route to. Ex - myserviceroute.id."},"replacePrefix":{"Type":4,"Flags":0,"Description":"Optionally update the prefix when sending the request to the service. Ex - replacePrefix: '/' and path: '/myservice' will transform '/myservice/myroute' to '/myroute'"}}}},{"3":{"ItemType":170}},{"2":{"Name":"GatewayTls","Properties":{"sslPassthrough":{"Type":2,"Flags":0,"Description":"If true, gateway lets the https traffic sslPassthrough to the backend servers for decryption."},"minimumProtocolVersion":{"Type":175,"Flags":0,"Description":"Tls Minimum versions for Gateway resource."},"certificateFrom":{"Type":4,"Flags":0,"Description":"The resource id for the secret containing the TLS certificate and key for the gateway."}}}},{"6":{"Value":"1.2"}},{"6":{"Value":"1.3"}},{"5":{"Elements":[173,174]}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/gateways@2023-10-01-preview","ScopeType":0,"Body":159}},{"6":{"Value":"Applications.Core/httpRoutes"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/httpRoutes","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":178,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":179,"Flags":10,"Description":"The resource api version"},"properties":{"Type":181,"Flags":0,"Description":"HTTPRoute properties"},"tags":{"Type":190,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"HttpRouteProperties","Properties":{"environment":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to (if applicable)"},"application":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by"},"provisioningState":{"Type":189,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."},"hostname":{"Type":4,"Flags":0,"Description":"The internal hostname accepting traffic for the HTTP Route. Readonly."},"port":{"Type":3,"Flags":0,"Description":"The port number for the HTTP Route. Defaults to 80. Readonly."},"scheme":{"Type":4,"Flags":2,"Description":"The scheme used for traffic. Readonly."},"url":{"Type":4,"Flags":2,"Description":"A stable URL that that can be used to route traffic to a resource. Readonly."}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[182,183,184,185,186,187,188]}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/httpRoutes@2023-10-01-preview","ScopeType":0,"Body":180}},{"6":{"Value":"Applications.Core/secretStores"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/secretStores","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":192,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":193,"Flags":10,"Description":"The resource api version"},"properties":{"Type":195,"Flags":0,"Description":"The properties of SecretStore"},"tags":{"Type":213,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"SecretStoreProperties","Properties":{"environment":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to (if applicable)"},"application":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by"},"provisioningState":{"Type":203,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."},"type":{"Type":206,"Flags":0,"Description":"The type of SecretStore data"},"data":{"Type":212,"Flags":1,"Description":"An object to represent key-value type secrets"},"resource":{"Type":4,"Flags":0,"Description":"The resource id of external secret store."}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[196,197,198,199,200,201,202]}},{"6":{"Value":"generic"}},{"6":{"Value":"certificate"}},{"5":{"Elements":[204,205]}},{"2":{"Name":"SecretValueProperties","Properties":{"encoding":{"Type":210,"Flags":0,"Description":"The type of SecretValue Encoding"},"value":{"Type":4,"Flags":0,"Description":"The value of secret."},"valueFrom":{"Type":211,"Flags":0,"Description":"The Secret value source properties"}}}},{"6":{"Value":"raw"}},{"6":{"Value":"base64"}},{"5":{"Elements":[208,209]}},{"2":{"Name":"ValueFromProperties","Properties":{"name":{"Type":4,"Flags":1,"Description":"The name of the referenced secret."},"version":{"Type":4,"Flags":0,"Description":"The version of the referenced secret."}}}},{"2":{"Name":"SecretStorePropertiesData","Properties":{},"AdditionalProperties":207}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/secretStores@2023-10-01-preview","ScopeType":0,"Body":194}},{"6":{"Value":"Applications.Core/volumes"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/volumes","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":215,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":216,"Flags":10,"Description":"The resource api version"},"properties":{"Type":218,"Flags":0,"Description":"Volume properties"},"tags":{"Type":250,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"7":{"Name":"VolumeProperties","Discriminator":"kind","BaseProperties":{"environment":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to (if applicable)"},"application":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by"},"provisioningState":{"Type":226,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."}},"Elements":{"azure.com.keyvault":227}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[219,220,221,222,223,224,225]}},{"2":{"Name":"AzureKeyVaultVolumeProperties","Properties":{"certificates":{"Type":240,"Flags":0,"Description":"The KeyVault certificates that this volume exposes"},"keys":{"Type":242,"Flags":0,"Description":"The KeyVault keys that this volume exposes"},"resource":{"Type":4,"Flags":1,"Description":"The ID of the keyvault to use for this volume resource"},"secrets":{"Type":248,"Flags":0,"Description":"The KeyVault secrets that this volume exposes"},"kind":{"Type":249,"Flags":1,"Description":"Discriminator property for VolumeProperties."}}}},{"2":{"Name":"CertificateObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk"},"encoding":{"Type":232,"Flags":0,"Description":"Represents secret encodings"},"format":{"Type":235,"Flags":0,"Description":"Represents certificate formats"},"name":{"Type":4,"Flags":1,"Description":"The name of the certificate"},"certType":{"Type":239,"Flags":0,"Description":"Represents certificate types"},"version":{"Type":4,"Flags":0,"Description":"Certificate version"}}}},{"6":{"Value":"utf-8"}},{"6":{"Value":"hex"}},{"6":{"Value":"base64"}},{"5":{"Elements":[229,230,231]}},{"6":{"Value":"pem"}},{"6":{"Value":"pfx"}},{"5":{"Elements":[233,234]}},{"6":{"Value":"certificate"}},{"6":{"Value":"privatekey"}},{"6":{"Value":"publickey"}},{"5":{"Elements":[236,237,238]}},{"2":{"Name":"AzureKeyVaultVolumePropertiesCertificates","Properties":{},"AdditionalProperties":228}},{"2":{"Name":"KeyObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk"},"name":{"Type":4,"Flags":1,"Description":"The name of the key"},"version":{"Type":4,"Flags":0,"Description":"Key version"}}}},{"2":{"Name":"AzureKeyVaultVolumePropertiesKeys","Properties":{},"AdditionalProperties":241}},{"2":{"Name":"SecretObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk"},"encoding":{"Type":247,"Flags":0,"Description":"Represents secret encodings"},"name":{"Type":4,"Flags":1,"Description":"The name of the secret"},"version":{"Type":4,"Flags":0,"Description":"secret version"}}}},{"6":{"Value":"utf-8"}},{"6":{"Value":"hex"}},{"6":{"Value":"base64"}},{"5":{"Elements":[244,245,246]}},{"2":{"Name":"AzureKeyVaultVolumePropertiesSecrets","Properties":{},"AdditionalProperties":243}},{"6":{"Value":"azure.com.keyvault"}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/volumes@2023-10-01-preview","ScopeType":0,"Body":217}},{"8":{"Name":"listSecrets","ResourceType":"Applications.Core/extenders","ApiVersion":"2023-10-01-preview","Output":0,"Input":0}},{"2":{"Name":"SecretStoreListSecretsResult","Properties":{"type":{"Type":256,"Flags":2,"Description":"The type of SecretStore data"},"data":{"Type":257,"Flags":2,"Description":"An object to represent key-value type secrets"}}}},{"6":{"Value":"generic"}},{"6":{"Value":"certificate"}},{"5":{"Elements":[254,255]}},{"2":{"Name":"SecretStoreListSecretsResultData","Properties":{},"AdditionalProperties":207}},{"8":{"Name":"listSecrets","ResourceType":"Applications.Core/secretStores","ApiVersion":"2023-10-01-preview","Output":253,"Input":0}}] \ No newline at end of file +[{"1":{"Kind":1}},{"1":{"Kind":2}},{"1":{"Kind":3}},{"1":{"Kind":4}},{"1":{"Kind":5}},{"1":{"Kind":6}},{"1":{"Kind":7}},{"1":{"Kind":8}},{"6":{"Value":"Applications.Core/applications"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/applications","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":8,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":9,"Flags":10,"Description":"The resource api version"},"properties":{"Type":11,"Flags":0,"Description":"Application properties"},"tags":{"Type":45,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"ApplicationProperties","Properties":{"provisioningState":{"Type":19,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"environment":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to"},"extensions":{"Type":34,"Flags":0,"Description":"The application extension."},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[12,13,14,15,16,17,18]}},{"7":{"Name":"Extension","Discriminator":"kind","BaseProperties":{},"Elements":{"daprSidecar":21,"kubernetesMetadata":26,"kubernetesNamespace":30,"manualScaling":32}}},{"2":{"Name":"DaprSidecarExtension","Properties":{"appPort":{"Type":3,"Flags":0,"Description":"The Dapr appPort. Specifies the internal listening port for the application to handle requests from the Dapr sidecar."},"appId":{"Type":4,"Flags":1,"Description":"The Dapr appId. Specifies the identifier used by Dapr for service invocation."},"config":{"Type":4,"Flags":0,"Description":"Specifies the Dapr configuration to use for the resource."},"protocol":{"Type":24,"Flags":0,"Description":"The Dapr sidecar extension protocol"},"kind":{"Type":25,"Flags":1,"Description":"Discriminator property for Extension."}}}},{"6":{"Value":"http"}},{"6":{"Value":"grpc"}},{"5":{"Elements":[22,23]}},{"6":{"Value":"daprSidecar"}},{"2":{"Name":"KubernetesMetadataExtension","Properties":{"annotations":{"Type":27,"Flags":0,"Description":"Annotations to be applied to the Kubernetes resources output by the resource"},"labels":{"Type":28,"Flags":0,"Description":"Labels to be applied to the Kubernetes resources output by the resource"},"kind":{"Type":29,"Flags":1,"Description":"Discriminator property for Extension."}}}},{"2":{"Name":"KubernetesMetadataExtensionAnnotations","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"KubernetesMetadataExtensionLabels","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"kubernetesMetadata"}},{"2":{"Name":"KubernetesNamespaceExtension","Properties":{"namespace":{"Type":4,"Flags":1,"Description":"The namespace of the application environment."},"kind":{"Type":31,"Flags":1,"Description":"Discriminator property for Extension."}}}},{"6":{"Value":"kubernetesNamespace"}},{"2":{"Name":"ManualScalingExtension","Properties":{"replicas":{"Type":3,"Flags":1,"Description":"Replica count."},"kind":{"Type":33,"Flags":1,"Description":"Discriminator property for Extension."}}}},{"6":{"Value":"manualScaling"}},{"3":{"ItemType":20}},{"2":{"Name":"ResourceStatus","Properties":{"compute":{"Type":36,"Flags":0,"Description":"Represents backing compute resource"},"outputResources":{"Type":44,"Flags":0,"Description":"Properties of an output resource"}}}},{"7":{"Name":"EnvironmentCompute","Discriminator":"kind","BaseProperties":{"resourceId":{"Type":4,"Flags":0,"Description":"The resource id of the compute resource for application environment."},"identity":{"Type":37,"Flags":0,"Description":"IdentitySettings is the external identity setting."}},"Elements":{"kubernetes":41}}},{"2":{"Name":"IdentitySettings","Properties":{"kind":{"Type":40,"Flags":1,"Description":"IdentitySettingKind is the kind of supported external identity setting"},"oidcIssuer":{"Type":4,"Flags":0,"Description":"The URI for your compute platform's OIDC issuer"},"resource":{"Type":4,"Flags":0,"Description":"The resource ID of the provisioned identity"}}}},{"6":{"Value":"undefined"}},{"6":{"Value":"azure.com.workload"}},{"5":{"Elements":[38,39]}},{"2":{"Name":"KubernetesCompute","Properties":{"namespace":{"Type":4,"Flags":1,"Description":"The namespace to use for the environment."},"kind":{"Type":42,"Flags":1,"Description":"Discriminator property for EnvironmentCompute."}}}},{"6":{"Value":"kubernetes"}},{"2":{"Name":"OutputResource","Properties":{"localId":{"Type":4,"Flags":0,"Description":"The logical identifier scoped to the owning Radius resource. This is only needed or used when a resource has a dependency relationship. LocalIDs do not have any particular format or meaning beyond being compared to determine dependency relationships."},"id":{"Type":4,"Flags":0,"Description":"The UCP resource ID of the underlying resource."},"radiusManaged":{"Type":2,"Flags":0,"Description":"Determines whether Radius manages the lifecycle of the underlying resource."}}}},{"3":{"ItemType":43}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"SystemData","Properties":{"createdBy":{"Type":4,"Flags":0,"Description":"The identity that created the resource."},"createdByType":{"Type":51,"Flags":0,"Description":"The type of identity that created the resource."},"createdAt":{"Type":4,"Flags":0,"Description":"The timestamp of resource creation (UTC)."},"lastModifiedBy":{"Type":4,"Flags":0,"Description":"The identity that last modified the resource."},"lastModifiedByType":{"Type":56,"Flags":0,"Description":"The type of identity that created the resource."},"lastModifiedAt":{"Type":4,"Flags":0,"Description":"The timestamp of resource last modification (UTC)"}}}},{"6":{"Value":"User"}},{"6":{"Value":"Application"}},{"6":{"Value":"ManagedIdentity"}},{"6":{"Value":"Key"}},{"5":{"Elements":[47,48,49,50]}},{"6":{"Value":"User"}},{"6":{"Value":"Application"}},{"6":{"Value":"ManagedIdentity"}},{"6":{"Value":"Key"}},{"5":{"Elements":[52,53,54,55]}},{"4":{"Name":"Applications.Core/applications@2023-10-01-preview","ScopeType":0,"Body":10}},{"6":{"Value":"Applications.Core/containers"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/containers","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":58,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":59,"Flags":10,"Description":"The resource api version"},"properties":{"Type":61,"Flags":0,"Description":"Container properties"},"tags":{"Type":117,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"ContainerProperties","Properties":{"environment":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to (if applicable)"},"application":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by"},"provisioningState":{"Type":69,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."},"container":{"Type":70,"Flags":1,"Description":"Definition of a container"},"connections":{"Type":107,"Flags":0,"Description":"Specifies a connection to another resource."},"identity":{"Type":37,"Flags":0,"Description":"IdentitySettings is the external identity setting."},"extensions":{"Type":108,"Flags":0,"Description":"Extensions spec of the resource"},"resourceProvisioning":{"Type":111,"Flags":0,"Description":"Specifies how the underlying service/resource is provisioned and managed. Available values are 'internal', where Radius manages the lifecycle of the resource internally, and 'manual', where a user manages the resource."},"resources":{"Type":113,"Flags":0,"Description":"A collection of references to resources associated with the container"},"runtimes":{"Type":114,"Flags":0,"Description":"The properties for runtime configuration"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[62,63,64,65,66,67,68]}},{"2":{"Name":"Container","Properties":{"image":{"Type":4,"Flags":1,"Description":"The registry and image to download and run in your container"},"imagePullPolicy":{"Type":74,"Flags":0,"Description":"The image pull policy for the container"},"env":{"Type":75,"Flags":0,"Description":"environment"},"ports":{"Type":80,"Flags":0,"Description":"container ports"},"readinessProbe":{"Type":81,"Flags":0,"Description":"Properties for readiness/liveness probe"},"livenessProbe":{"Type":81,"Flags":0,"Description":"Properties for readiness/liveness probe"},"volumes":{"Type":100,"Flags":0,"Description":"container volumes"},"command":{"Type":101,"Flags":0,"Description":"Entrypoint array. Overrides the container image's ENTRYPOINT"},"args":{"Type":102,"Flags":0,"Description":"Arguments to the entrypoint. Overrides the container image's CMD"},"workingDir":{"Type":4,"Flags":0,"Description":"Working directory for the container"}}}},{"6":{"Value":"Always"}},{"6":{"Value":"IfNotPresent"}},{"6":{"Value":"Never"}},{"5":{"Elements":[71,72,73]}},{"2":{"Name":"ContainerEnv","Properties":{},"AdditionalProperties":4}},{"2":{"Name":"ContainerPortProperties","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"protocol":{"Type":79,"Flags":0,"Description":"The protocol in use by the port"},"provides":{"Type":4,"Flags":0,"Description":"Specifies a route provided by this port"},"scheme":{"Type":4,"Flags":0,"Description":"Specifies the URL scheme of the communication protocol. Consumers can use the scheme to construct a URL. The value defaults to 'http' or 'https' depending on the port value"},"port":{"Type":3,"Flags":0,"Description":"Specifies the port that will be exposed by this container. Must be set when value different from containerPort is desired"}}}},{"6":{"Value":"TCP"}},{"6":{"Value":"UDP"}},{"5":{"Elements":[77,78]}},{"2":{"Name":"ContainerPorts","Properties":{},"AdditionalProperties":76}},{"7":{"Name":"HealthProbeProperties","Discriminator":"kind","BaseProperties":{"initialDelaySeconds":{"Type":3,"Flags":0,"Description":"Initial delay in seconds before probing for readiness/liveness"},"failureThreshold":{"Type":3,"Flags":0,"Description":"Threshold number of times the probe fails after which a failure would be reported"},"periodSeconds":{"Type":3,"Flags":0,"Description":"Interval for the readiness/liveness probe in seconds"},"timeoutSeconds":{"Type":3,"Flags":0,"Description":"Number of seconds after which the readiness/liveness probe times out. Defaults to 5 seconds"}},"Elements":{"exec":82,"httpGet":84,"tcp":87}}},{"2":{"Name":"ExecHealthProbeProperties","Properties":{"command":{"Type":4,"Flags":1,"Description":"Command to execute to probe readiness/liveness"},"kind":{"Type":83,"Flags":1,"Description":"Discriminator property for HealthProbeProperties."}}}},{"6":{"Value":"exec"}},{"2":{"Name":"HttpGetHealthProbeProperties","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"path":{"Type":4,"Flags":1,"Description":"The route to make the HTTP request on"},"headers":{"Type":85,"Flags":0,"Description":"Custom HTTP headers to add to the get request"},"kind":{"Type":86,"Flags":1,"Description":"Discriminator property for HealthProbeProperties."}}}},{"2":{"Name":"HttpGetHealthProbePropertiesHeaders","Properties":{},"AdditionalProperties":4}},{"6":{"Value":"httpGet"}},{"2":{"Name":"TcpHealthProbeProperties","Properties":{"containerPort":{"Type":3,"Flags":1,"Description":"The listening port number"},"kind":{"Type":88,"Flags":1,"Description":"Discriminator property for HealthProbeProperties."}}}},{"6":{"Value":"tcp"}},{"7":{"Name":"Volume","Discriminator":"kind","BaseProperties":{"mountPath":{"Type":4,"Flags":0,"Description":"The path where the volume is mounted"}},"Elements":{"ephemeral":90,"persistent":95}}},{"2":{"Name":"EphemeralVolume","Properties":{"managedStore":{"Type":93,"Flags":1,"Description":"The managed store for the ephemeral volume"},"kind":{"Type":94,"Flags":1,"Description":"Discriminator property for Volume."}}}},{"6":{"Value":"memory"}},{"6":{"Value":"disk"}},{"5":{"Elements":[91,92]}},{"6":{"Value":"ephemeral"}},{"2":{"Name":"PersistentVolume","Properties":{"permission":{"Type":98,"Flags":0,"Description":"The persistent volume permission"},"source":{"Type":4,"Flags":1,"Description":"The source of the volume"},"kind":{"Type":99,"Flags":1,"Description":"Discriminator property for Volume."}}}},{"6":{"Value":"read"}},{"6":{"Value":"write"}},{"5":{"Elements":[96,97]}},{"6":{"Value":"persistent"}},{"2":{"Name":"ContainerVolumes","Properties":{},"AdditionalProperties":89}},{"3":{"ItemType":4}},{"3":{"ItemType":4}},{"2":{"Name":"ConnectionProperties","Properties":{"source":{"Type":4,"Flags":1,"Description":"The source of the connection"},"disableDefaultEnvVars":{"Type":2,"Flags":0,"Description":"default environment variable override"},"iam":{"Type":104,"Flags":0,"Description":"IAM properties"}}}},{"2":{"Name":"IamProperties","Properties":{"kind":{"Type":105,"Flags":1,"Description":"The kind of IAM provider to configure"},"roles":{"Type":106,"Flags":0,"Description":"RBAC permissions to be assigned on the source resource"}}}},{"6":{"Value":"azure"}},{"3":{"ItemType":4}},{"2":{"Name":"ContainerPropertiesConnections","Properties":{},"AdditionalProperties":103}},{"3":{"ItemType":20}},{"6":{"Value":"internal"}},{"6":{"Value":"manual"}},{"5":{"Elements":[109,110]}},{"2":{"Name":"ResourceReference","Properties":{"id":{"Type":4,"Flags":1,"Description":"Resource id of an existing resource"}}}},{"3":{"ItemType":112}},{"2":{"Name":"RuntimesProperties","Properties":{"kubernetes":{"Type":115,"Flags":0,"Description":"The runtime configuration properties for Kubernetes"}}}},{"2":{"Name":"KubernetesRuntimeProperties","Properties":{"base":{"Type":4,"Flags":0,"Description":"The serialized YAML manifest which represents the base Kubernetes resources to deploy, such as Deployment, Service, ServiceAccount, Secrets, and ConfigMaps."},"pod":{"Type":116,"Flags":0,"Description":"A strategic merge patch that will be applied to the PodSpec object when this container is being deployed."}}}},{"2":{"Name":"KubernetesPodSpec","Properties":{},"AdditionalProperties":0}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/containers@2023-10-01-preview","ScopeType":0,"Body":60}},{"6":{"Value":"Applications.Core/environments"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/environments","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":119,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":120,"Flags":10,"Description":"The resource api version"},"properties":{"Type":122,"Flags":0,"Description":"Environment properties"},"tags":{"Type":142,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"EnvironmentProperties","Properties":{"provisioningState":{"Type":130,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"compute":{"Type":36,"Flags":1,"Description":"Represents backing compute resource"},"providers":{"Type":131,"Flags":0,"Description":"The Cloud providers configuration"},"recipes":{"Type":140,"Flags":0,"Description":"Specifies Recipes linked to the Environment."},"extensions":{"Type":141,"Flags":0,"Description":"The environment extension."}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[123,124,125,126,127,128,129]}},{"2":{"Name":"Providers","Properties":{"azure":{"Type":132,"Flags":0,"Description":"The Azure cloud provider definition"},"aws":{"Type":133,"Flags":0,"Description":"The AWS cloud provider definition"}}}},{"2":{"Name":"ProvidersAzure","Properties":{"scope":{"Type":4,"Flags":1,"Description":"Target scope for Azure resources to be deployed into. For example: '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup'"}}}},{"2":{"Name":"ProvidersAws","Properties":{"scope":{"Type":4,"Flags":1,"Description":"Target scope for AWS resources to be deployed into. For example: '/planes/aws/aws/accounts/000000000000/regions/us-west-2'"}}}},{"7":{"Name":"RecipeProperties","Discriminator":"templateKind","BaseProperties":{"templatePath":{"Type":4,"Flags":1,"Description":"Path to the template provided by the recipe. Currently only link to Azure Container Registry is supported."},"parameters":{"Type":0,"Flags":0,"Description":"Any object"}},"Elements":{"bicep":135,"terraform":137}}},{"2":{"Name":"BicepRecipeProperties","Properties":{"templateKind":{"Type":136,"Flags":1,"Description":"Discriminator property for RecipeProperties."}}}},{"6":{"Value":"bicep"}},{"2":{"Name":"TerraformRecipeProperties","Properties":{"templateVersion":{"Type":4,"Flags":0,"Description":"Version of the template to deploy. For Terraform recipes using a module registry this is required, but must be omitted for other module sources."},"templateKind":{"Type":138,"Flags":1,"Description":"Discriminator property for RecipeProperties."}}}},{"6":{"Value":"terraform"}},{"2":{"Name":"DictionaryOfRecipeProperties","Properties":{},"AdditionalProperties":134}},{"2":{"Name":"EnvironmentPropertiesRecipes","Properties":{},"AdditionalProperties":139}},{"3":{"ItemType":20}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/environments@2023-10-01-preview","ScopeType":0,"Body":121}},{"6":{"Value":"Applications.Core/extenders"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/extenders","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":144,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":145,"Flags":10,"Description":"The resource api version"},"properties":{"Type":147,"Flags":0,"Description":"ExtenderResource portable resource properties"},"tags":{"Type":160,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"ExtenderProperties","Properties":{"environment":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to"},"application":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by (if applicable)"},"provisioningState":{"Type":155,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."},"secrets":{"Type":0,"Flags":0,"Description":"Any object"},"recipe":{"Type":156,"Flags":0,"Description":"The recipe used to automatically deploy underlying infrastructure for a portable resource"},"resourceProvisioning":{"Type":159,"Flags":0,"Description":"Specifies how the underlying service/resource is provisioned and managed. Available values are 'recipe', where Radius manages the lifecycle of the resource through a Recipe, and 'manual', where a user manages the resource and provides the values."}},"AdditionalProperties":0}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[148,149,150,151,152,153,154]}},{"2":{"Name":"Recipe","Properties":{"name":{"Type":4,"Flags":1,"Description":"The name of the recipe within the environment to use"},"parameters":{"Type":0,"Flags":0,"Description":"Any object"}}}},{"6":{"Value":"recipe"}},{"6":{"Value":"manual"}},{"5":{"Elements":[157,158]}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/extenders@2023-10-01-preview","ScopeType":0,"Body":146}},{"6":{"Value":"Applications.Core/gateways"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/gateways","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":162,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":163,"Flags":10,"Description":"The resource api version"},"properties":{"Type":165,"Flags":0,"Description":"Gateway properties"},"tags":{"Type":181,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"GatewayProperties","Properties":{"environment":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to (if applicable)"},"application":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by"},"provisioningState":{"Type":173,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."},"internal":{"Type":2,"Flags":0,"Description":"Sets Gateway to not be exposed externally (no public IP address associated). Defaults to false (exposed to internet)."},"hostname":{"Type":174,"Flags":0,"Description":"Declare hostname information for the Gateway. Leaving the hostname empty auto-assigns one: mygateway.myapp.PUBLICHOSTNAMEORIP.nip.io."},"routes":{"Type":176,"Flags":1,"Description":"Routes attached to this Gateway"},"tls":{"Type":177,"Flags":0,"Description":"TLS configuration definition for Gateway resource."},"url":{"Type":4,"Flags":2,"Description":"URL of the gateway resource. Readonly"}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[166,167,168,169,170,171,172]}},{"2":{"Name":"GatewayHostname","Properties":{"prefix":{"Type":4,"Flags":0,"Description":"Specify a prefix for the hostname: myhostname.myapp.PUBLICHOSTNAMEORIP.nip.io. Mutually exclusive with 'fullyQualifiedHostname' and will be overridden if both are defined."},"fullyQualifiedHostname":{"Type":4,"Flags":0,"Description":"Specify a fully-qualified domain name: myapp.mydomain.com. Mutually exclusive with 'prefix' and will take priority if both are defined."}}}},{"2":{"Name":"GatewayRoute","Properties":{"path":{"Type":4,"Flags":0,"Description":"The path to match the incoming request path on. Ex - /myservice."},"destination":{"Type":4,"Flags":0,"Description":"The HttpRoute to route to. Ex - myserviceroute.id."},"replacePrefix":{"Type":4,"Flags":0,"Description":"Optionally update the prefix when sending the request to the service. Ex - replacePrefix: '/' and path: '/myservice' will transform '/myservice/myroute' to '/myroute'"}}}},{"3":{"ItemType":175}},{"2":{"Name":"GatewayTls","Properties":{"sslPassthrough":{"Type":2,"Flags":0,"Description":"If true, gateway lets the https traffic sslPassthrough to the backend servers for decryption."},"minimumProtocolVersion":{"Type":180,"Flags":0,"Description":"Tls Minimum versions for Gateway resource."},"certificateFrom":{"Type":4,"Flags":0,"Description":"The resource id for the secret containing the TLS certificate and key for the gateway."}}}},{"6":{"Value":"1.2"}},{"6":{"Value":"1.3"}},{"5":{"Elements":[178,179]}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/gateways@2023-10-01-preview","ScopeType":0,"Body":164}},{"6":{"Value":"Applications.Core/httpRoutes"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/httpRoutes","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":183,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":184,"Flags":10,"Description":"The resource api version"},"properties":{"Type":186,"Flags":0,"Description":"HTTPRoute properties"},"tags":{"Type":195,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"HttpRouteProperties","Properties":{"environment":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to (if applicable)"},"application":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by"},"provisioningState":{"Type":194,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."},"hostname":{"Type":4,"Flags":0,"Description":"The internal hostname accepting traffic for the HTTP Route. Readonly."},"port":{"Type":3,"Flags":0,"Description":"The port number for the HTTP Route. Defaults to 80. Readonly."},"scheme":{"Type":4,"Flags":2,"Description":"The scheme used for traffic. Readonly."},"url":{"Type":4,"Flags":2,"Description":"A stable URL that that can be used to route traffic to a resource. Readonly."}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[187,188,189,190,191,192,193]}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/httpRoutes@2023-10-01-preview","ScopeType":0,"Body":185}},{"6":{"Value":"Applications.Core/secretStores"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/secretStores","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":197,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":198,"Flags":10,"Description":"The resource api version"},"properties":{"Type":200,"Flags":0,"Description":"The properties of SecretStore"},"tags":{"Type":218,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"2":{"Name":"SecretStoreProperties","Properties":{"environment":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to (if applicable)"},"application":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by"},"provisioningState":{"Type":208,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."},"type":{"Type":211,"Flags":0,"Description":"The type of SecretStore data"},"data":{"Type":217,"Flags":1,"Description":"An object to represent key-value type secrets"},"resource":{"Type":4,"Flags":0,"Description":"The resource id of external secret store."}}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[201,202,203,204,205,206,207]}},{"6":{"Value":"generic"}},{"6":{"Value":"certificate"}},{"5":{"Elements":[209,210]}},{"2":{"Name":"SecretValueProperties","Properties":{"encoding":{"Type":215,"Flags":0,"Description":"The type of SecretValue Encoding"},"value":{"Type":4,"Flags":0,"Description":"The value of secret."},"valueFrom":{"Type":216,"Flags":0,"Description":"The Secret value source properties"}}}},{"6":{"Value":"raw"}},{"6":{"Value":"base64"}},{"5":{"Elements":[213,214]}},{"2":{"Name":"ValueFromProperties","Properties":{"name":{"Type":4,"Flags":1,"Description":"The name of the referenced secret."},"version":{"Type":4,"Flags":0,"Description":"The version of the referenced secret."}}}},{"2":{"Name":"SecretStorePropertiesData","Properties":{},"AdditionalProperties":212}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/secretStores@2023-10-01-preview","ScopeType":0,"Body":199}},{"6":{"Value":"Applications.Core/volumes"}},{"6":{"Value":"2023-10-01-preview"}},{"2":{"Name":"Applications.Core/volumes","Properties":{"id":{"Type":4,"Flags":10,"Description":"The resource id"},"name":{"Type":4,"Flags":9,"Description":"The resource name"},"type":{"Type":220,"Flags":10,"Description":"The resource type"},"apiVersion":{"Type":221,"Flags":10,"Description":"The resource api version"},"properties":{"Type":223,"Flags":0,"Description":"Volume properties"},"tags":{"Type":255,"Flags":0,"Description":"Resource tags."},"location":{"Type":4,"Flags":1,"Description":"The geo-location where the resource lives"},"systemData":{"Type":46,"Flags":2,"Description":"Metadata pertaining to creation and last modification of the resource."}}}},{"7":{"Name":"VolumeProperties","Discriminator":"kind","BaseProperties":{"environment":{"Type":4,"Flags":0,"Description":"Fully qualified resource ID for the environment that the portable resource is linked to (if applicable)"},"application":{"Type":4,"Flags":1,"Description":"Fully qualified resource ID for the application that the portable resource is consumed by"},"provisioningState":{"Type":231,"Flags":2,"Description":"Provisioning state of the portable resource at the time the operation was called"},"status":{"Type":35,"Flags":2,"Description":"Status of a resource."}},"Elements":{"azure.com.keyvault":232}}},{"6":{"Value":"Succeeded"}},{"6":{"Value":"Failed"}},{"6":{"Value":"Canceled"}},{"6":{"Value":"Provisioning"}},{"6":{"Value":"Updating"}},{"6":{"Value":"Deleting"}},{"6":{"Value":"Accepted"}},{"5":{"Elements":[224,225,226,227,228,229,230]}},{"2":{"Name":"AzureKeyVaultVolumeProperties","Properties":{"certificates":{"Type":245,"Flags":0,"Description":"The KeyVault certificates that this volume exposes"},"keys":{"Type":247,"Flags":0,"Description":"The KeyVault keys that this volume exposes"},"resource":{"Type":4,"Flags":1,"Description":"The ID of the keyvault to use for this volume resource"},"secrets":{"Type":253,"Flags":0,"Description":"The KeyVault secrets that this volume exposes"},"kind":{"Type":254,"Flags":1,"Description":"Discriminator property for VolumeProperties."}}}},{"2":{"Name":"CertificateObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk"},"encoding":{"Type":237,"Flags":0,"Description":"Represents secret encodings"},"format":{"Type":240,"Flags":0,"Description":"Represents certificate formats"},"name":{"Type":4,"Flags":1,"Description":"The name of the certificate"},"certType":{"Type":244,"Flags":0,"Description":"Represents certificate types"},"version":{"Type":4,"Flags":0,"Description":"Certificate version"}}}},{"6":{"Value":"utf-8"}},{"6":{"Value":"hex"}},{"6":{"Value":"base64"}},{"5":{"Elements":[234,235,236]}},{"6":{"Value":"pem"}},{"6":{"Value":"pfx"}},{"5":{"Elements":[238,239]}},{"6":{"Value":"certificate"}},{"6":{"Value":"privatekey"}},{"6":{"Value":"publickey"}},{"5":{"Elements":[241,242,243]}},{"2":{"Name":"AzureKeyVaultVolumePropertiesCertificates","Properties":{},"AdditionalProperties":233}},{"2":{"Name":"KeyObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk"},"name":{"Type":4,"Flags":1,"Description":"The name of the key"},"version":{"Type":4,"Flags":0,"Description":"Key version"}}}},{"2":{"Name":"AzureKeyVaultVolumePropertiesKeys","Properties":{},"AdditionalProperties":246}},{"2":{"Name":"SecretObjectProperties","Properties":{"alias":{"Type":4,"Flags":0,"Description":"File name when written to disk"},"encoding":{"Type":252,"Flags":0,"Description":"Represents secret encodings"},"name":{"Type":4,"Flags":1,"Description":"The name of the secret"},"version":{"Type":4,"Flags":0,"Description":"secret version"}}}},{"6":{"Value":"utf-8"}},{"6":{"Value":"hex"}},{"6":{"Value":"base64"}},{"5":{"Elements":[249,250,251]}},{"2":{"Name":"AzureKeyVaultVolumePropertiesSecrets","Properties":{},"AdditionalProperties":248}},{"6":{"Value":"azure.com.keyvault"}},{"2":{"Name":"TrackedResourceTags","Properties":{},"AdditionalProperties":4}},{"4":{"Name":"Applications.Core/volumes@2023-10-01-preview","ScopeType":0,"Body":222}},{"8":{"Name":"listSecrets","ResourceType":"Applications.Core/extenders","ApiVersion":"2023-10-01-preview","Output":0,"Input":0}},{"2":{"Name":"SecretStoreListSecretsResult","Properties":{"type":{"Type":261,"Flags":2,"Description":"The type of SecretStore data"},"data":{"Type":262,"Flags":2,"Description":"An object to represent key-value type secrets"}}}},{"6":{"Value":"generic"}},{"6":{"Value":"certificate"}},{"5":{"Elements":[259,260]}},{"2":{"Name":"SecretStoreListSecretsResultData","Properties":{},"AdditionalProperties":212}},{"8":{"Name":"listSecrets","ResourceType":"Applications.Core/secretStores","ApiVersion":"2023-10-01-preview","Output":258,"Input":0}}] \ No newline at end of file diff --git a/hack/bicep-types-radius/generated/applications/applications.core/2023-10-01-preview/types.md b/hack/bicep-types-radius/generated/applications/applications.core/2023-10-01-preview/types.md index 8faf19b4cd..5a5f40e1ff 100644 --- a/hack/bicep-types-radius/generated/applications/applications.core/2023-10-01-preview/types.md +++ b/hack/bicep-types-radius/generated/applications/applications.core/2023-10-01-preview/types.md @@ -206,6 +206,8 @@ * **extensions**: [Extension](#extension)[]: Extensions spec of the resource * **identity**: [IdentitySettings](#identitysettings): IdentitySettings is the external identity setting. * **provisioningState**: 'Accepted' | 'Canceled' | 'Deleting' | 'Failed' | 'Provisioning' | 'Succeeded' | 'Updating' (ReadOnly): Provisioning state of the portable resource at the time the operation was called +* **resourceProvisioning**: 'internal' | 'manual': Specifies how the underlying service/resource is provisioned and managed. Available values are 'internal', where Radius manages the lifecycle of the resource internally, and 'manual', where a user manages the resource. +* **resources**: [ResourceReference](#resourcereference)[]: A collection of references to resources associated with the container * **runtimes**: [RuntimesProperties](#runtimesproperties): The properties for runtime configuration * **status**: [ResourceStatus](#resourcestatus) (ReadOnly): Status of a resource. @@ -309,6 +311,10 @@ * **source**: string (Required): The source of the volume +## ResourceReference +### Properties +* **id**: string (Required): Resource id of an existing resource + ## RuntimesProperties ### Properties * **kubernetes**: [KubernetesRuntimeProperties](#kubernetesruntimeproperties): The runtime configuration properties for Kubernetes diff --git a/hack/bicep-types-radius/generated/index.json b/hack/bicep-types-radius/generated/index.json index c2d6d2eee7..ea62c599b2 100644 --- a/hack/bicep-types-radius/generated/index.json +++ b/hack/bicep-types-radius/generated/index.json @@ -1 +1 @@ -{"Resources":{"Applications.Core/applications@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":57},"Applications.Core/containers@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":113},"Applications.Core/environments@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":138},"Applications.Core/extenders@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":156},"Applications.Core/gateways@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":177},"Applications.Core/httpRoutes@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":191},"Applications.Core/secretStores@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":214},"Applications.Core/volumes@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":251},"Applications.Dapr/pubSubBrokers@2023-10-01-preview":{"RelativePath":"applications/applications.dapr/2023-10-01-preview/types.json","Index":48},"Applications.Dapr/secretStores@2023-10-01-preview":{"RelativePath":"applications/applications.dapr/2023-10-01-preview/types.json","Index":65},"Applications.Dapr/stateStores@2023-10-01-preview":{"RelativePath":"applications/applications.dapr/2023-10-01-preview/types.json","Index":83},"Applications.Datastores/mongoDatabases@2023-10-01-preview":{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":49},"Applications.Datastores/redisCaches@2023-10-01-preview":{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":68},"Applications.Datastores/sqlDatabases@2023-10-01-preview":{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":87},"Applications.Messaging/rabbitMQQueues@2023-10-01-preview":{"RelativePath":"applications/applications.messaging/2023-10-01-preview/types.json","Index":49}},"Functions":{"applications.core/extenders":{"2023-10-01-preview":[{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":252}]},"applications.core/secretstores":{"2023-10-01-preview":[{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":258}]},"applications.datastores/mongodatabases":{"2023-10-01-preview":[{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":89}]},"applications.datastores/rediscaches":{"2023-10-01-preview":[{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":91}]},"applications.datastores/sqldatabases":{"2023-10-01-preview":[{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":93}]},"applications.messaging/rabbitmqqueues":{"2023-10-01-preview":[{"RelativePath":"applications/applications.messaging/2023-10-01-preview/types.json","Index":51}]}}} \ No newline at end of file +{"Resources":{"Applications.Core/applications@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":57},"Applications.Core/containers@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":118},"Applications.Core/environments@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":143},"Applications.Core/extenders@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":161},"Applications.Core/gateways@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":182},"Applications.Core/httpRoutes@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":196},"Applications.Core/secretStores@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":219},"Applications.Core/volumes@2023-10-01-preview":{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":256},"Applications.Dapr/pubSubBrokers@2023-10-01-preview":{"RelativePath":"applications/applications.dapr/2023-10-01-preview/types.json","Index":48},"Applications.Dapr/secretStores@2023-10-01-preview":{"RelativePath":"applications/applications.dapr/2023-10-01-preview/types.json","Index":65},"Applications.Dapr/stateStores@2023-10-01-preview":{"RelativePath":"applications/applications.dapr/2023-10-01-preview/types.json","Index":83},"Applications.Datastores/mongoDatabases@2023-10-01-preview":{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":49},"Applications.Datastores/redisCaches@2023-10-01-preview":{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":68},"Applications.Datastores/sqlDatabases@2023-10-01-preview":{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":87},"Applications.Messaging/rabbitMQQueues@2023-10-01-preview":{"RelativePath":"applications/applications.messaging/2023-10-01-preview/types.json","Index":49}},"Functions":{"applications.core/extenders":{"2023-10-01-preview":[{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":257}]},"applications.core/secretstores":{"2023-10-01-preview":[{"RelativePath":"applications/applications.core/2023-10-01-preview/types.json","Index":263}]},"applications.datastores/mongodatabases":{"2023-10-01-preview":[{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":89}]},"applications.datastores/rediscaches":{"2023-10-01-preview":[{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":91}]},"applications.datastores/sqldatabases":{"2023-10-01-preview":[{"RelativePath":"applications/applications.datastores/2023-10-01-preview/types.json","Index":93}]},"applications.messaging/rabbitmqqueues":{"2023-10-01-preview":[{"RelativePath":"applications/applications.messaging/2023-10-01-preview/types.json","Index":51}]}}} \ No newline at end of file diff --git a/pkg/corerp/api/v20231001preview/container_conversion.go b/pkg/corerp/api/v20231001preview/container_conversion.go index a4c5938cc6..ce9ffaaf24 100644 --- a/pkg/corerp/api/v20231001preview/container_conversion.go +++ b/pkg/corerp/api/v20231001preview/container_conversion.go @@ -133,14 +133,16 @@ func (src *ContainerResource) ConvertTo() (v1.DataModelInterface, error) { Args: stringSlice(src.Properties.Container.Args), WorkingDir: to.String(src.Properties.Container.WorkingDir), }, - Extensions: extensions, - Runtimes: toRuntimeProperties(src.Properties.Runtimes), + Extensions: extensions, + Runtimes: toRuntimePropertiesDataModel(src.Properties.Runtimes), + ResourceProvisioning: toContainerResourceProvisioningDataModel(src.Properties.ResourceProvisioning), + Resources: toResourceReferencesDataModel(src.Properties.Resources), }, } if src.Properties.Identity != nil { converted.Properties.Identity = &rpv1.IdentitySettings{ - Kind: toIdentityKind(src.Properties.Identity.Kind), + Kind: toIdentityKindDataModel(src.Properties.Identity.Kind), OIDCIssuer: to.String(src.Properties.Identity.OidcIssuer), Resource: to.String(src.Properties.Identity.Resource), } @@ -241,7 +243,7 @@ func (dst *ContainerResource) ConvertFrom(src v1.DataModelInterface) error { dst.Tags = *to.StringMapPtr(c.Tags) dst.Properties = &ContainerProperties{ Status: &ResourceStatus{ - OutputResources: toOutputResources(c.Properties.Status.OutputResources), + OutputResources: toOutputResourcesDataModel(c.Properties.Status.OutputResources), }, ProvisioningState: fromProvisioningStateDataModel(c.InternalMetadata.AsyncProvisioningState), Application: to.Ptr(c.Properties.Application), @@ -258,9 +260,11 @@ func (dst *ContainerResource) ConvertFrom(src v1.DataModelInterface) error { Args: to.SliceOfPtrs(c.Properties.Container.Args...), WorkingDir: to.Ptr(c.Properties.Container.WorkingDir), }, - Extensions: extensions, - Identity: identity, - Runtimes: fromRuntimeProperties(c.Properties.Runtimes), + Extensions: extensions, + Identity: identity, + Runtimes: fromRuntimePropertiesDataModel(c.Properties.Runtimes), + Resources: fromResourceReferencesDataModel(c.Properties.Resources), + ResourceProvisioning: fromContainerResourceProvisioningDataModel(c.Properties.ResourceProvisioning), } return nil @@ -504,7 +508,7 @@ func fromManagedStoreDataModel(managedStore datamodel.ManagedStore) *ManagedStor return &m } -func toRuntimeProperties(runtime *RuntimesProperties) *datamodel.RuntimeProperties { +func toRuntimePropertiesDataModel(runtime *RuntimesProperties) *datamodel.RuntimeProperties { if runtime == nil { return nil } @@ -528,7 +532,7 @@ func toRuntimeProperties(runtime *RuntimesProperties) *datamodel.RuntimeProperti return r } -func fromRuntimeProperties(runtime *datamodel.RuntimeProperties) *RuntimesProperties { +func fromRuntimePropertiesDataModel(runtime *datamodel.RuntimeProperties) *RuntimesProperties { if runtime == nil { return nil } @@ -548,6 +552,50 @@ func fromRuntimeProperties(runtime *datamodel.RuntimeProperties) *RuntimesProper return r } +func toResourceReferencesDataModel(r []*ResourceReference) []datamodel.ResourceReference { + result := []datamodel.ResourceReference{} + for _, rr := range r { + result = append(result, datamodel.ResourceReference{ID: to.String(rr.ID)}) + } + + return result +} + +func fromResourceReferencesDataModel(r []datamodel.ResourceReference) []*ResourceReference { + result := []*ResourceReference{} + for _, rr := range r { + result = append(result, &ResourceReference{ID: to.Ptr(rr.ID)}) + } + + return result +} + +func toContainerResourceProvisioningDataModel(r *ContainerResourceProvisioning) datamodel.ContainerResourceProvisioning { + if r == nil { + return datamodel.ContainerResourceProvisioningInternal + } + + switch *r { + case ContainerResourceProvisioningInternal: + return datamodel.ContainerResourceProvisioningInternal + case ContainerResourceProvisioningManual: + return datamodel.ContainerResourceProvisioningManual + default: + return datamodel.ContainerResourceProvisioningInternal + } +} + +func fromContainerResourceProvisioningDataModel(r datamodel.ContainerResourceProvisioning) *ContainerResourceProvisioning { + switch r { + case datamodel.ContainerResourceProvisioningInternal: + return to.Ptr(ContainerResourceProvisioningInternal) + case datamodel.ContainerResourceProvisioningManual: + return to.Ptr(ContainerResourceProvisioningManual) + default: + return nil + } +} + func toPermissionDataModel(rbac *VolumePermission) datamodel.VolumePermission { if rbac == nil { return datamodel.VolumePermissionRead diff --git a/pkg/corerp/api/v20231001preview/container_conversion_test.go b/pkg/corerp/api/v20231001preview/container_conversion_test.go index 955a2cad17..7493cb7748 100644 --- a/pkg/corerp/api/v20231001preview/container_conversion_test.go +++ b/pkg/corerp/api/v20231001preview/container_conversion_test.go @@ -56,6 +56,11 @@ func TestContainerConvertVersionedToDataModel(t *testing.T) { err: nil, emptyExt: true, }, + { + filename: "containerresource-manual.json", + err: nil, + emptyExt: true, + }, } for _, tt := range conversionTests { @@ -79,6 +84,13 @@ func TestContainerConvertVersionedToDataModel(t *testing.T) { require.Equal(t, "container0", ct.Name) require.Equal(t, "Applications.Core/containers", ct.Type) require.Equal(t, "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Applications.Core/applications/app0", ct.Properties.Application) + + if tt.filename == "containerresource-manual.json" { + require.Equal(t, datamodel.ContainerResourceProvisioningManual, ct.Properties.ResourceProvisioning) + require.Equal(t, []datamodel.ResourceReference{{ID: "/planes/test/local/providers/Test.Namespace/testResources/test-resource"}}, ct.Properties.Resources) + return + } + val, ok := ct.Properties.Connections["inventory"] require.True(t, ok) require.Equal(t, "inventory_route_id", val.Source) @@ -109,6 +121,7 @@ func TestContainerConvertVersionedToDataModel(t *testing.T) { require.Equal(t, *r.Properties.Runtimes.Kubernetes.Base, ct.Properties.Runtimes.Kubernetes.Base) require.Equal(t, "{\"containers\":[{\"name\":\"sidecar\"}],\"hostNetwork\":true}", ct.Properties.Runtimes.Kubernetes.Pod) } + } }) } @@ -118,22 +131,21 @@ func TestContainerConvertDataModelToVersioned(t *testing.T) { conversionTests := []struct { filename string err error - emptyExt bool }{ { filename: "containerresourcedatamodel.json", err: nil, - emptyExt: false, }, { filename: "containerresourcedatamodel-runtime.json", err: nil, - emptyExt: false, }, { filename: "containerresourcedatamodelemptyext.json", err: nil, - emptyExt: true, + }, + { + filename: "containerresourcedatamodel-manual.json", }, } @@ -151,18 +163,24 @@ func TestContainerConvertDataModelToVersioned(t *testing.T) { if tt.err != nil { require.ErrorIs(t, err, tt.err) } else { - // assert require.NoError(t, err) - require.Equal(t, "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/radius-test-rg/providers/Applications.Core/containers/container0", r.ID) + require.Equal(t, "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/radius-test-rg/providers/Applications.Core/containers/container0", *versioned.ID) require.Equal(t, "container0", r.Name) require.Equal(t, "Applications.Core/containers", r.Type) - require.Equal(t, "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Applications.Core/applications/app0", r.Properties.Application) + require.Equal(t, "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Applications.Core/applications/app0", *versioned.Properties.Application) + + if tt.filename == "containerresourcedatamodel-manual.json" { + require.Equal(t, ContainerResourceProvisioning("manual"), *versioned.Properties.ResourceProvisioning) + require.Equal(t, []*ResourceReference{{ID: to.Ptr("/planes/test/local/providers/Test.Namespace/testResources/test-resource")}}, versioned.Properties.Resources) + return + } + val, ok := r.Properties.Connections["inventory"] require.True(t, ok) require.Equal(t, "inventory_route_id", val.Source) require.Equal(t, "azure", string(val.IAM.Kind)) require.Equal(t, "read", val.IAM.Roles[0]) - require.Equal(t, "radius.azurecr.io/webapptutorial-todoapp", r.Properties.Container.Image) + require.Equal(t, "radius.azurecr.io/webapptutorial-todoapp", *versioned.Properties.Container.Image) require.Equal(t, resourcetypeutil.MustPopulateResourceStatus(&ResourceStatus{}), versioned.Properties.Status) require.Equal(t, "kubernetesMetadata", *versioned.Properties.Extensions[2].GetExtension().Kind) require.Equal(t, 3, len(versioned.Properties.Extensions)) diff --git a/pkg/corerp/api/v20231001preview/environment_conversion.go b/pkg/corerp/api/v20231001preview/environment_conversion.go index 760f3e61f5..c028bb2769 100644 --- a/pkg/corerp/api/v20231001preview/environment_conversion.go +++ b/pkg/corerp/api/v20231001preview/environment_conversion.go @@ -187,7 +187,7 @@ func toEnvironmentComputeDataModel(h EnvironmentComputeClassification) (*rpv1.En var identity *rpv1.IdentitySettings if v.Identity != nil { identity = &rpv1.IdentitySettings{ - Kind: toIdentityKind(v.Identity.Kind), + Kind: toIdentityKindDataModel(v.Identity.Kind), Resource: to.String(v.Identity.Resource), OIDCIssuer: to.String(v.Identity.OidcIssuer), } diff --git a/pkg/corerp/api/v20231001preview/extender_conversion.go b/pkg/corerp/api/v20231001preview/extender_conversion.go index e1429f559a..41df64ef60 100644 --- a/pkg/corerp/api/v20231001preview/extender_conversion.go +++ b/pkg/corerp/api/v20231001preview/extender_conversion.go @@ -77,7 +77,7 @@ func (dst *ExtenderResource) ConvertFrom(src v1.DataModelInterface) error { dst.Tags = *to.StringMapPtr(extender.Tags) dst.Properties = &ExtenderProperties{ Status: &ResourceStatus{ - OutputResources: toOutputResources(extender.Properties.Status.OutputResources), + OutputResources: toOutputResourcesDataModel(extender.Properties.Status.OutputResources), }, ProvisioningState: fromProvisioningStateDataModel(extender.InternalMetadata.AsyncProvisioningState), Environment: to.Ptr(extender.Properties.Environment), diff --git a/pkg/corerp/api/v20231001preview/gateway_conversion.go b/pkg/corerp/api/v20231001preview/gateway_conversion.go index ef22dd7d40..db2d3e1545 100644 --- a/pkg/corerp/api/v20231001preview/gateway_conversion.go +++ b/pkg/corerp/api/v20231001preview/gateway_conversion.go @@ -134,7 +134,7 @@ func (dst *GatewayResource) ConvertFrom(src v1.DataModelInterface) error { dst.Tags = *to.StringMapPtr(g.Tags) dst.Properties = &GatewayProperties{ Status: &ResourceStatus{ - OutputResources: toOutputResources(g.Properties.Status.OutputResources), + OutputResources: toOutputResourcesDataModel(g.Properties.Status.OutputResources), }, ProvisioningState: fromProvisioningStateDataModel(g.InternalMetadata.AsyncProvisioningState), Application: to.Ptr(g.Properties.Application), diff --git a/pkg/corerp/api/v20231001preview/httproute_conversion.go b/pkg/corerp/api/v20231001preview/httproute_conversion.go index b237945fc4..bb2df03aa9 100644 --- a/pkg/corerp/api/v20231001preview/httproute_conversion.go +++ b/pkg/corerp/api/v20231001preview/httproute_conversion.go @@ -68,7 +68,7 @@ func (dst *HTTPRouteResource) ConvertFrom(src v1.DataModelInterface) error { dst.Tags = *to.StringMapPtr(route.Tags) dst.Properties = &HTTPRouteProperties{ Status: &ResourceStatus{ - OutputResources: toOutputResources(route.Properties.Status.OutputResources), + OutputResources: toOutputResourcesDataModel(route.Properties.Status.OutputResources), }, ProvisioningState: fromProvisioningStateDataModel(route.InternalMetadata.AsyncProvisioningState), Application: to.Ptr(route.Properties.Application), diff --git a/pkg/corerp/api/v20231001preview/secretstore_conversion.go b/pkg/corerp/api/v20231001preview/secretstore_conversion.go index 662085de38..cf1049f25b 100644 --- a/pkg/corerp/api/v20231001preview/secretstore_conversion.go +++ b/pkg/corerp/api/v20231001preview/secretstore_conversion.go @@ -66,7 +66,7 @@ func (dst *SecretStoreResource) ConvertFrom(src v1.DataModelInterface) error { dst.Tags = *to.StringMapPtr(ss.Tags) dst.Properties = &SecretStoreProperties{ Status: &ResourceStatus{ - OutputResources: toOutputResources(ss.Properties.Status.OutputResources), + OutputResources: toOutputResourcesDataModel(ss.Properties.Status.OutputResources), }, ProvisioningState: fromProvisioningStateDataModel(ss.InternalMetadata.AsyncProvisioningState), Application: to.Ptr(ss.Properties.Application), diff --git a/pkg/corerp/api/v20231001preview/testdata/containerresource-manual.json b/pkg/corerp/api/v20231001preview/testdata/containerresource-manual.json new file mode 100644 index 0000000000..d8548c736a --- /dev/null +++ b/pkg/corerp/api/v20231001preview/testdata/containerresource-manual.json @@ -0,0 +1,17 @@ +{ + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/radius-test-rg/providers/Applications.Core/containers/container0", + "name": "container0", + "type": "Applications.Core/containers", + "properties": { + "application": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Applications.Core/applications/app0", + "container": { + "image": "none" + }, + "resourceProvisioning": "manual", + "resources": [ + { + "id": "/planes/test/local/providers/Test.Namespace/testResources/test-resource" + } + ] + } +} \ No newline at end of file diff --git a/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel-manual.json b/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel-manual.json new file mode 100644 index 0000000000..1d6b96fc6b --- /dev/null +++ b/pkg/corerp/api/v20231001preview/testdata/containerresourcedatamodel-manual.json @@ -0,0 +1,36 @@ +{ + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/radius-test-rg/providers/Applications.Core/containers/container0", + "name": "container0", + "type": "Applications.Core/containers", + "systemData": { + "createdBy": "fakeid@live.com", + "createdByType": "User", + "createdAt": "2021-09-24T19:09:54.2403864Z", + "lastModifiedBy": "fakeid@live.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-09-24T20:09:54.2403864Z" + }, + "tags": { + "env": "dev" + }, + "provisioningState": "Succeeded", + "properties": { + "status": { + "outputResources": [ + { + "id": "/planes/test/local/providers/Test.Namespace/testResources/test-resource" + } + ] + }, + "application": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Applications.Core/applications/app0", + "container": { + "image": "none" + }, + "resourceProvisioning": "manual", + "resources": [ + { + "id": "/planes/test/local/providers/Test.Namespace/testResources/test-resource" + } + ] + } +} \ No newline at end of file diff --git a/pkg/corerp/api/v20231001preview/util.go b/pkg/corerp/api/v20231001preview/util.go index 09873c98a2..8ff440b1b1 100644 --- a/pkg/corerp/api/v20231001preview/util.go +++ b/pkg/corerp/api/v20231001preview/util.go @@ -89,7 +89,7 @@ func fromIdentityKind(kind rpv1.IdentitySettingKind) *IdentitySettingKind { } } -func toIdentityKind(kind *IdentitySettingKind) rpv1.IdentitySettingKind { +func toIdentityKindDataModel(kind *IdentitySettingKind) rpv1.IdentitySettingKind { if kind == nil { return rpv1.IdentityNone } @@ -117,7 +117,7 @@ func isValidTemplateKind(templateKind string) bool { return slices.Contains(recipes.SupportedTemplateKind, templateKind) } -func toOutputResources(outputResources []rpv1.OutputResource) []*OutputResource { +func toOutputResourcesDataModel(outputResources []rpv1.OutputResource) []*OutputResource { var outResources []*OutputResource for _, or := range outputResources { r := &OutputResource{ diff --git a/pkg/corerp/api/v20231001preview/volume_conversion.go b/pkg/corerp/api/v20231001preview/volume_conversion.go index aa5354c0e7..804101c4bb 100644 --- a/pkg/corerp/api/v20231001preview/volume_conversion.go +++ b/pkg/corerp/api/v20231001preview/volume_conversion.go @@ -95,7 +95,7 @@ func (dst *VolumeResource) ConvertFrom(src v1.DataModelInterface) error { azProp := resource.Properties.AzureKeyVault p := &AzureKeyVaultVolumeProperties{ Status: &ResourceStatus{ - OutputResources: toOutputResources(resource.Properties.Status.OutputResources), + OutputResources: toOutputResourcesDataModel(resource.Properties.Status.OutputResources), }, Kind: to.Ptr(resource.Properties.Kind), Application: to.Ptr(resource.Properties.Application), diff --git a/pkg/corerp/api/v20231001preview/zz_generated_constants.go b/pkg/corerp/api/v20231001preview/zz_generated_constants.go index f43027a15e..4568f4683a 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_constants.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_constants.go @@ -65,6 +65,26 @@ func PossibleCertificateTypesValues() []CertificateTypes { } } +// ContainerResourceProvisioning - Specifies how the underlying service/resource is provisioned and managed. Available values +// are 'internal', where Radius manages the lifecycle of the resource internally, and 'manual', where a user +// manages the resource. +type ContainerResourceProvisioning string + +const ( + // ContainerResourceProvisioningInternal - The resource lifecycle will be managed internally by Radius + ContainerResourceProvisioningInternal ContainerResourceProvisioning = "internal" + // ContainerResourceProvisioningManual - The resource lifecycle will be managed by the user + ContainerResourceProvisioningManual ContainerResourceProvisioning = "manual" +) + +// PossibleContainerResourceProvisioningValues returns the possible values for the ContainerResourceProvisioning const type. +func PossibleContainerResourceProvisioningValues() []ContainerResourceProvisioning { + return []ContainerResourceProvisioning{ + ContainerResourceProvisioningInternal, + ContainerResourceProvisioningManual, + } +} + // CreatedByType - The type of identity that created the resource. type CreatedByType string diff --git a/pkg/corerp/api/v20231001preview/zz_generated_models.go b/pkg/corerp/api/v20231001preview/zz_generated_models.go index f1ba3d213d..3e25f39af5 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_models.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_models.go @@ -300,6 +300,12 @@ type ContainerProperties struct { // Configuration for supported external identity providers Identity *IdentitySettings + // Specifies how the underlying container resource is provisioned and managed. + ResourceProvisioning *ContainerResourceProvisioning + + // A collection of references to resources associated with the container + Resources []*ResourceReference + // Specifies Runtime-specific functionality Runtimes *RuntimesProperties @@ -372,6 +378,12 @@ type ContainerResourceUpdateProperties struct { // Configuration for supported external identity providers Identity *IdentitySettingsUpdate + // Specifies how the underlying container resource is provisioned and managed. + ResourceProvisioning *ContainerResourceProvisioning + + // A collection of references to resources associated with the container + Resources []*ResourceReference + // Specifies Runtime-specific functionality Runtimes *RuntimesProperties } @@ -1372,6 +1384,12 @@ type Resource struct { Type *string } +// ResourceReference - Describes a reference to an existing resource +type ResourceReference struct { + // REQUIRED; Resource id of an existing resource + ID *string +} + // ResourceStatus - Status of a resource. type ResourceStatus struct { // The compute resource associated with the resource. diff --git a/pkg/corerp/api/v20231001preview/zz_generated_models_serde.go b/pkg/corerp/api/v20231001preview/zz_generated_models_serde.go index de8b186349..542eb87a9a 100644 --- a/pkg/corerp/api/v20231001preview/zz_generated_models_serde.go +++ b/pkg/corerp/api/v20231001preview/zz_generated_models_serde.go @@ -621,6 +621,8 @@ func (c ContainerProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "extensions", c.Extensions) populate(objectMap, "identity", c.Identity) populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "resourceProvisioning", c.ResourceProvisioning) + populate(objectMap, "resources", c.Resources) populate(objectMap, "runtimes", c.Runtimes) populate(objectMap, "status", c.Status) return json.Marshal(objectMap) @@ -656,6 +658,12 @@ func (c *ContainerProperties) UnmarshalJSON(data []byte) error { case "provisioningState": err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) delete(rawMsg, key) + case "resourceProvisioning": + err = unpopulate(val, "ResourceProvisioning", &c.ResourceProvisioning) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &c.Resources) + delete(rawMsg, key) case "runtimes": err = unpopulate(val, "Runtimes", &c.Runtimes) delete(rawMsg, key) @@ -792,6 +800,8 @@ func (c ContainerResourceUpdateProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "environment", c.Environment) populate(objectMap, "extensions", c.Extensions) populate(objectMap, "identity", c.Identity) + populate(objectMap, "resourceProvisioning", c.ResourceProvisioning) + populate(objectMap, "resources", c.Resources) populate(objectMap, "runtimes", c.Runtimes) return json.Marshal(objectMap) } @@ -823,6 +833,12 @@ func (c *ContainerResourceUpdateProperties) UnmarshalJSON(data []byte) error { case "identity": err = unpopulate(val, "Identity", &c.Identity) delete(rawMsg, key) + case "resourceProvisioning": + err = unpopulate(val, "ResourceProvisioning", &c.ResourceProvisioning) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &c.Resources) + delete(rawMsg, key) case "runtimes": err = unpopulate(val, "Runtimes", &c.Runtimes) delete(rawMsg, key) @@ -3255,6 +3271,33 @@ func (r *Resource) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ResourceReference. +func (r ResourceReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceReference. +func (r *ResourceReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ResourceStatus. func (r ResourceStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/pkg/corerp/datamodel/container.go b/pkg/corerp/datamodel/container.go index 87fe8ec615..822a340570 100644 --- a/pkg/corerp/datamodel/container.go +++ b/pkg/corerp/datamodel/container.go @@ -71,13 +71,26 @@ func (conn ConnectionProperties) GetDisableDefaultEnvVars() bool { // ContainerProperties represents the properties of Container. type ContainerProperties struct { rpv1.BasicResourceProperties - Connections map[string]ConnectionProperties `json:"connections,omitempty"` - Container Container `json:"container,omitempty"` - Extensions []Extension `json:"extensions,omitempty"` - Identity *rpv1.IdentitySettings `json:"identity,omitempty"` - Runtimes *RuntimeProperties `json:"runtimes,omitempty"` + Connections map[string]ConnectionProperties `json:"connections,omitempty"` + Container Container `json:"container,omitempty"` + Extensions []Extension `json:"extensions,omitempty"` + Identity *rpv1.IdentitySettings `json:"identity,omitempty"` + Runtimes *RuntimeProperties `json:"runtimes,omitempty"` + Resources []ResourceReference `json:"resources,omitempty"` + ResourceProvisioning ContainerResourceProvisioning `json:"resourceProvisioning,omitempty"` } +// ContainerResourceProvisioning specifies how resources should be created for the container. +type ContainerResourceProvisioning string + +const ( + // ContainerResourceProvisioningInternal specifies that Radius will create resources for the container according to its internal logic. + ContainerResourceProvisioningInternal ContainerResourceProvisioning = "internal" + + // ContainerResourceProvisioningManual specifies that Radius will not create resources for the container, and the user will have to create them manually. + ContainerResourceProvisioningManual ContainerResourceProvisioning = "manual" +) + // KubernetesRuntime represents the Kubernetes runtime configuration. type KubernetesRuntime struct { // Base represents the Kubernetes resource definition in the serialized YAML format @@ -133,6 +146,10 @@ const ( ProtocolUDP Protocol = "UDP" ) +type ResourceReference struct { + ID string `json:"id,omitempty"` +} + type VolumeKind string const ( diff --git a/pkg/corerp/handlers/kubernetes.go b/pkg/corerp/handlers/kubernetes.go index cbcfa770a3..9555550c39 100644 --- a/pkg/corerp/handlers/kubernetes.go +++ b/pkg/corerp/handlers/kubernetes.go @@ -78,6 +78,12 @@ type kubernetesHandler struct { // deployment, it also waits until the deployment is ready. func (handler *kubernetesHandler) Put(ctx context.Context, options *PutOptions) (map[string]string, error) { logger := ucplog.FromContextOrDiscard(ctx) + + // If CreateResource is nil, then we don't need to create a resource. + if options.Resource.CreateResource == nil { + return map[string]string{}, nil + } + item, err := convertToUnstructured(*options.Resource) if err != nil { return nil, err diff --git a/pkg/corerp/renderers/container/render.go b/pkg/corerp/renderers/container/render.go index 05f93340c5..e205f84270 100644 --- a/pkg/corerp/renderers/container/render.go +++ b/pkg/corerp/renderers/container/render.go @@ -165,6 +165,21 @@ func (r Renderer) Render(ctx context.Context, dm v1.DataModelInterface, options return renderers.RendererOutput{}, v1.NewClientErrInvalidRequest(fmt.Sprintf("invalid application id: %s ", err.Error())) } + outputResources := []rpv1.OutputResource{} + for _, rr := range properties.Resources { + id, err := resources.Parse(rr.ID) + if err != nil { + return renderers.RendererOutput{}, err + } + + outputResources = append(outputResources, rpv1.OutputResource{ID: id, RadiusManaged: to.Ptr(false)}) + } + + if properties.ResourceProvisioning == datamodel.ContainerResourceProvisioningManual { + // Do nothing! This is a manual resource. + return renderers.RendererOutput{Resources: outputResources}, nil + } + // this flag is used to indicate whether or not this resource needs a service to be generated. // this flag is triggered when a container has an exposed port(s), but no 'provides' field. var needsServiceGeneration = false @@ -201,7 +216,6 @@ func (r Renderer) Render(ctx context.Context, dm v1.DataModelInterface, options } } - outputResources := []rpv1.OutputResource{} dependencies := options.Dependencies // Connections might require a role assignment to grant access. diff --git a/pkg/corerp/renderers/container/render_test.go b/pkg/corerp/renderers/container/render_test.go index d4f5dcb7ee..5a05deb866 100644 --- a/pkg/corerp/renderers/container/render_test.go +++ b/pkg/corerp/renderers/container/render_test.go @@ -397,6 +397,41 @@ func Test_Render_WithCommandArgsWorkingDir(t *testing.T) { require.Len(t, output.Resources, 4) } +func Test_Render_Manual(t *testing.T) { + properties := datamodel.ContainerProperties{ + BasicResourceProperties: rpv1.BasicResourceProperties{ + Application: applicationResourceID, + }, + Container: datamodel.Container{ + Image: "none", + }, + ResourceProvisioning: datamodel.ContainerResourceProvisioningManual, + Resources: []datamodel.ResourceReference{ + { + ID: testResourceID, + }, + }, + } + resource := makeResource(t, properties) + dependencies := map[string]renderers.RendererDependency{} + + ctx := testcontext.New(t) + renderer := Renderer{} + output, err := renderer.Render(ctx, resource, renderers.RenderOptions{Dependencies: dependencies}) + require.NoError(t, err) + require.Empty(t, output.ComputedValues) + require.Empty(t, output.SecretValues) + + expected := []rpv1.OutputResource{ + { + ID: resources.MustParse(testResourceID), + RadiusManaged: to.Ptr(false), + }, + } + + require.Equal(t, expected, output.Resources) +} + func Test_Render_PortWithoutRoute(t *testing.T) { properties := datamodel.ContainerProperties{ BasicResourceProperties: rpv1.BasicResourceProperties{ diff --git a/pkg/corerp/renderers/daprextension/renderer.go b/pkg/corerp/renderers/daprextension/renderer.go index d486718ed3..a76a1423c5 100644 --- a/pkg/corerp/renderers/daprextension/renderer.go +++ b/pkg/corerp/renderers/daprextension/renderer.go @@ -78,6 +78,11 @@ func (r *Renderer) Render(ctx context.Context, dm v1.DataModelInterface, options continue } + // This can be nil for a 'manual' model container. + if output.Resources[i].CreateResource == nil { + continue + } + o, ok := output.Resources[i].CreateResource.Data.(runtime.Object) if !ok { return renderers.RendererOutput{}, errors.New("found Kubernetes resource with non-Kubernetes payload") diff --git a/pkg/corerp/renderers/kubernetesmetadata/render.go b/pkg/corerp/renderers/kubernetesmetadata/render.go index 74ff3d91c3..c1840bd791 100644 --- a/pkg/corerp/renderers/kubernetesmetadata/render.go +++ b/pkg/corerp/renderers/kubernetesmetadata/render.go @@ -72,6 +72,11 @@ func (r *Renderer) Render(ctx context.Context, dm v1.DataModelInterface, options continue } + // This can be nil for a 'manual' model container. + if ores.CreateResource == nil { + continue + } + dep, ok := ores.CreateResource.Data.(*appsv1.Deployment) if !ok { continue diff --git a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/openapi.json b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/openapi.json index ca851d19e3..c3b3eb4524 100644 --- a/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/openapi.json +++ b/swagger/specification/applications/resource-manager/Applications.Core/preview/2023-10-01-preview/openapi.json @@ -2950,6 +2950,17 @@ }, "x-ms-identifiers": [] }, + "resourceProvisioning": { + "$ref": "#/definitions/ContainerResourceProvisioning", + "description": "Specifies how the underlying container resource is provisioned and managed." + }, + "resources": { + "type": "array", + "description": "A collection of references to resources associated with the container", + "items": { + "$ref": "#/definitions/ResourceReference" + } + }, "runtimes": { "$ref": "#/definitions/RuntimesProperties", "description": "Specifies Runtime-specific functionality" @@ -3001,6 +3012,30 @@ "value" ] }, + "ContainerResourceProvisioning": { + "type": "string", + "description": "Specifies how the underlying service/resource is provisioned and managed. Available values are 'internal', where Radius manages the lifecycle of the resource internally, and 'manual', where a user manages the resource.", + "enum": [ + "internal", + "manual" + ], + "x-ms-enum": { + "name": "ContainerResourceProvisioning", + "modelAsString": true, + "values": [ + { + "name": "internal", + "value": "internal", + "description": "The resource lifecycle will be managed internally by Radius" + }, + { + "name": "manual", + "value": "manual", + "description": "The resource lifecycle will be managed by the user" + } + ] + } + }, "ContainerResourceUpdate": { "type": "object", "description": "The type used for update operations of the ContainerResource.", @@ -3053,6 +3088,17 @@ }, "x-ms-identifiers": [] }, + "resourceProvisioning": { + "$ref": "#/definitions/ContainerResourceProvisioning", + "description": "Specifies how the underlying container resource is provisioned and managed." + }, + "resources": { + "type": "array", + "description": "A collection of references to resources associated with the container", + "items": { + "$ref": "#/definitions/ResourceReference" + } + }, "runtimes": { "$ref": "#/definitions/RuntimesProperties", "description": "Specifies Runtime-specific functionality" @@ -4588,6 +4634,19 @@ ] } }, + "ResourceReference": { + "type": "object", + "description": "Describes a reference to an existing resource", + "properties": { + "id": { + "type": "string", + "description": "Resource id of an existing resource" + } + }, + "required": [ + "id" + ] + }, "ResourceStatus": { "type": "object", "description": "Status of a resource.", diff --git a/typespec/Applications.Core/containers.tsp b/typespec/Applications.Core/containers.tsp index 27e8b11e1b..17a2325c7a 100644 --- a/typespec/Applications.Core/containers.tsp +++ b/typespec/Applications.Core/containers.tsp @@ -62,10 +62,25 @@ model ContainerProperties { @extension("x-ms-identifiers", []) extensions?: Extension[]; + @doc("Specifies how the underlying container resource is provisioned and managed.") + resourceProvisioning?: ContainerResourceProvisioning; + + @doc("A collection of references to resources associated with the container") + resources?: ResourceReference[]; + @doc("Specifies Runtime-specific functionality") runtimes?: RuntimesProperties; } +@doc("Specifies how the underlying service/resource is provisioned and managed. Available values are 'internal', where Radius manages the lifecycle of the resource internally, and 'manual', where a user manages the resource.") +enum ContainerResourceProvisioning { + @doc("The resource lifecycle will be managed internally by Radius") + internal, + + @doc("The resource lifecycle will be managed by the user") + manual, +} + @doc("The properties for runtime configuration") model RuntimesProperties { @doc("The runtime configuration properties for Kubernetes")