Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Microsoft.App #4517

Merged
merged 7 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading