crossplane-contrib / provider-jet-azure

Apache License 2.0
17 stars 20 forks source link

Promote mariadb resources to `v1alpha2` #182

Closed ytsarev closed 2 years ago

ytsarev commented 2 years ago

Description of your changes

This PR configures, stabilizes and promotes to v1alpha2 all existing mariadb resources, specifically

databases.dbformariadb.azure.jet.crossplane.io
firewallrules.dbformariadb.azure.jet.crossplane.io
virtualnetworkrules.dbformariadb.azure.jet.crossplane.io
servers.dbformariadb.azure.jet.crossplane.io
configurations.dbformariadb.azure.jet.crossplane.io

Fixes #180

I have:

How has this code been tested

All provided examples were tested end-to-end with minimal naming modifications.

 k get managed
Warning: Please use v1beta1 version of SNS group.
NAME                                                                              READY   SYNCED   EXTERNAL-NAME                               AGE
resourcegroup.azure.jet.crossplane.io/mariadb-test-yury                           True    True     mariadb-test-yury                           77m

NAME                                                                               READY   SYNCED   EXTERNAL-NAME                                                                                                                                                                                  AGE
configuration.dbformariadb.azure.jet.crossplane.io/example-mariadb-configuration   True    True     /subscriptions/<redacted>/resourceGroups/mariadb-test-yury/providers/Microsoft.DBforMariaDB/servers/example-mariadb-server-yury/configurations/interactive_timeout   6m56s

NAME                                                                       READY   SYNCED   EXTERNAL-NAME                AGE
database.dbformariadb.azure.jet.crossplane.io/examplemariadbdatabaseyury   True    True     examplemariadbdatabaseyury   74m

NAME                                                                      READY   SYNCED   EXTERNAL-NAME                 AGE
server.dbformariadb.azure.jet.crossplane.io/example-mariadb-server-yury   True    True     example-mariadb-server-yury   74m

NAME                                                         READY   SYNCED   EXTERNAL-NAME         AGE
subnet.network.azure.jet.crossplane.io/example-subnet-yury   True    True     example-subnet-yury   69m

NAME                                                             READY   SYNCED   EXTERNAL-NAME     AGE
virtualnetwork.network.azure.jet.crossplane.io/example-vn-yury   True    True     example-vn-yury   69m

One caveat: I was not able to fully test virtualnetworkrules.dbformariadb.azure.jet.crossplane.io because it is not available on the Basic azure plan I am using at the moment.

k get virtualnetworkrule.dbformariadb.azure.jet.crossplane.io/example-mariadb-vnet-rule
NAME                        READY   SYNCED   EXTERNAL-NAME               AGE
example-mariadb-vnet-rule   False   True     example-mariadb-vnet-rule   17m
  "properties": {
        "statusMessage": "{\"status\":\"Failed\",\"error\":{\"code\":\"ResourceOperationFailure\",\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"code\":\"FeatureNotSupportedForEdition\",\"message\":\"This feature is not available for the selected edition 'Basic'.\"}]}}",

Still, the Azure API has properly accepted the object and it should work properly.

ytsarev commented 2 years ago

@ulucinar thanks a ton for the careful review, I've address two points in latest commit of https://github.com/crossplane-contrib/provider-jet-azure/pull/182/commits/641e3dec7171640957e5922f54ccbd0b8a33a78d, please check it up.

Let's align on https://github.com/crossplane-contrib/provider-jet-azure/pull/182#discussion_r868948937 , I do not have strong opinion against switching to NameAsIdentifier but the UX is not something obvious to me here