Skip to content

Commit

Permalink
Add support for Microsoft.App (#4517)
Browse files Browse the repository at this point in the history
* Add support for Microsoft.App

* Add tests and recordings

* Add samples; recordings; extensions

* update auto generated docs

* gofmt file

* Fix ManagedEnvironment version, documentation and sample

* Add EOL in samples
  • Loading branch information
super-harsh authored Feb 4, 2025
1 parent fbd6ed7 commit 02d36b8
Show file tree
Hide file tree
Showing 65 changed files with 132,449 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/hugo/content/reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,21 @@ These resource(s) are available for use in the current release of ASO. Different
| [Subscription](https://azure.github.io/azure-service-operator/reference/apimanagement/v1api20230501preview/#apimanagement.azure.com/v1api20230501preview.Subscription) | 2023-05-01-preview | v1api20230501preview | v2.6.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/apimanagement/v1api20230501preview/v1api20230501preview_subscription.yaml) |
| [Subscription](https://azure.github.io/azure-service-operator/reference/apimanagement/v1api20220801/#apimanagement.azure.com/v1api20220801.Subscription) | 2022-08-01 | v1api20220801 | v2.4.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/apimanagement/v1api20220801/v1api20220801_subscription.yaml) |

## App

To install the CRDs for these resources, your ASO configuration must include `app.azure.com/*` as a one of the configured CRD patterns. See [CRD Management in ASO](https://azure.github.io/azure-service-operator/guide/crd-management/) for details on doing this for both [Helm](https://azure.github.io/azure-service-operator/guide/crd-management/#helm) and [YAML](https://azure.github.io/azure-service-operator/guide/crd-management/#yaml) based installations.

### Next Release

Development of these new resources is complete and they will be available in the next release of ASO.

| Resource | ARM Version | CRD Version | Supported From | Sample |
|--------------------|-------------|---------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------|
| AuthConfig | 2024-03-01 | v1api20240301 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/app/v1api20240301/v1api20240301_authconfig.yaml) |
| ContainerApp | 2024-03-01 | v1api20240301 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/app/v1api20240301/v1api20240301_containerapp.yaml) |
| Job | 2024-03-01 | v1api20240301 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/app/v1api20240301/v1api20240301_job.yaml) |
| ManagedEnvironment | 2024-03-01 | v1api20240301 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/app/v1api20240301/v1api20240301_managedenvironment.yaml) |

## AppConfiguration

To install the CRDs for these resources, your ASO configuration must include `appconfiguration.azure.com/*` as a one of the configured CRD patterns. See [CRD Management in ASO](https://azure.github.io/azure-service-operator/guide/crd-management/) for details on doing this for both [Helm](https://azure.github.io/azure-service-operator/guide/crd-management/#helm) and [YAML](https://azure.github.io/azure-service-operator/guide/crd-management/#yaml) based installations.
Expand Down
18 changes: 18 additions & 0 deletions docs/hugo/content/reference/app/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: App Supported Resources
linktitle: App
no_list: true
---
To install the CRDs for these resources, your ASO configuration must include `app.azure.com/*` as a one of the configured CRD patterns. See [CRD Management in ASO](https://azure.github.io/azure-service-operator/guide/crd-management/) for details on doing this for both [Helm](https://azure.github.io/azure-service-operator/guide/crd-management/#helm) and [YAML](https://azure.github.io/azure-service-operator/guide/crd-management/#yaml) based installations.

### Next Release

Development of these new resources is complete and they will be available in the next release of ASO.

| Resource | ARM Version | CRD Version | Supported From | Sample |
|--------------------|-------------|---------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------|
| AuthConfig | 2024-03-01 | v1api20240301 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/app/v1api20240301/v1api20240301_authconfig.yaml) |
| ContainerApp | 2024-03-01 | v1api20240301 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/app/v1api20240301/v1api20240301_containerapp.yaml) |
| Job | 2024-03-01 | v1api20240301 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/app/v1api20240301/v1api20240301_job.yaml) |
| ManagedEnvironment | 2024-03-01 | v1api20240301 | v2.12.0 | [View](https://github.com/Azure/azure-service-operator/tree/main/v2/samples/app/v1api20240301/v1api20240301_managedenvironment.yaml) |

20 changes: 20 additions & 0 deletions v2/api/app/customizations/auth_config_extension_types_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions v2/api/app/customizations/container_app_extension_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
*/

package customizations

import (
"github.com/go-logr/logr"

"github.com/Azure/azure-service-operator/v2/internal/genericarmclient"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime/core"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions"
)

var _ extensions.ErrorClassifier = &ContainerAppExtension{}

// ClassifyError evaluates the provided error, returning whether it is fatal or can be retried.
// cloudError is the error returned from ARM.
// apiVersion is the ARM API version used for the request.
// log is a logger than can be used for telemetry.
// next is the next implementation to call.
func (e *ContainerAppExtension) ClassifyError(
cloudError *genericarmclient.CloudError,
apiVersion string,
log logr.Logger,
next extensions.ErrorClassifierFunc,
) (core.CloudErrorDetails, error) {
details, err := next(cloudError)
if err != nil {
return core.CloudErrorDetails{}, err
}

if cloudError.Code() == "ManagedEnvironmentNotProvisioned" {
details.Classification = core.ErrorRetryable
}

return details, nil
}
20 changes: 20 additions & 0 deletions v2/api/app/customizations/container_app_extension_types_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions v2/api/app/customizations/job_extension_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
*/

package customizations

import (
"github.com/go-logr/logr"

"github.com/Azure/azure-service-operator/v2/internal/genericarmclient"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime/core"
"github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions"
)

var _ extensions.ErrorClassifier = &JobExtension{}

// ClassifyError evaluates the provided error, returning whether it is fatal or can be retried.
// cloudError is the error returned from ARM.
// apiVersion is the ARM API version used for the request.
// log is a logger than can be used for telemetry.
// next is the next implementation to call.
func (e *JobExtension) ClassifyError(
cloudError *genericarmclient.CloudError,
apiVersion string,
log logr.Logger,
next extensions.ErrorClassifierFunc,
) (core.CloudErrorDetails, error) {
details, err := next(cloudError)
if err != nil {
return core.CloudErrorDetails{}, err
}

if cloudError.Code() == "ManagedEnvironmentNotProvisioned" {
details.Classification = core.ErrorRetryable
}

return details, nil
}
20 changes: 20 additions & 0 deletions v2/api/app/customizations/job_extension_types_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions v2/api/app/customizations/structure.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Code generated by azure-service-operator-codegen. DO NOT EDIT.
github.com/Azure/azure-service-operator/v2/api/app/customizations
-----------------------------------------------------------------
AuthConfigExtension: Object (0 properties)
ContainerAppExtension: Object (0 properties)
JobExtension: Object (0 properties)
ManagedEnvironmentExtension: Object (0 properties)
Loading

0 comments on commit 02d36b8

Please sign in to comment.