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

Task: Add messages across SqlFirewallRule Controller #326

Closed
1 task
melonrush13 opened this issue Oct 10, 2019 · 1 comment
Closed
1 task

Task: Add messages across SqlFirewallRule Controller #326

melonrush13 opened this issue Oct 10, 2019 · 1 comment
Assignees

Comments

@melonrush13
Copy link
Contributor

melonrush13 commented Oct 10, 2019

Task

  • Add messages to SqlFirewallRule Controller
  • Add message field to SqlFirewallRuleStatus types
  • (Add any missed messages to SqlServer controller along the way)

Done criteria

  • Messages shown when doing a k get for the sqlfirewall controller

User story reference

#

@melonrush13 melonrush13 self-assigned this Oct 10, 2019
@melonrush13 melonrush13 changed the title Task: Add messages across SqlFirewall Controller Task: Add messages across SqlFirewallRule Controller Oct 10, 2019
@melonrush13
Copy link
Contributor Author

#356

Porges added a commit that referenced this issue May 11, 2021
### Naming changes

Don't convert all resource Spec `Name` properties to `string`, and instead allow the following cases:

- An enum with one value generates no `AzureName` property in the CRD as it cannot be changed. An `AzureName()` function is provided for `ConvertToArm` to invoke, which returns the fixed value.
  This only triggers for one resource currently:
    - Web `HostingEnvironmentsMultiRolePool` which must have a name of `default`

- An enum with multiple values generates an `AzureName` property with an enum value. An `AzureName()` function is provided for `ConvertToArm` which casts the enum value to string.
  Example resources for this are:
    - Keyvault `VaultsAccessPolicies` which allows names of `add`, `remove`, and `replace`
    - API Management `ServiceIdentityProvider` which allows names of `aad`, `aadB2C`, `facebook`, `google`, `microsoft`, and `twitter`

All Spec `Name` properties are still converted to `string` for the corresponding ARM type, as we need to insert a full ARM ID including owning resource IDs, etc.

### Serialization changes

Split `ArmTransformer` interface into two parts `FromArmConverter`/`ToArmConverter` and make it so that Status types only implement `FromArmConverter`.

## Other cases

There are other cases to be solved; some services (like Storage) require a Name ending in `default` (which is actually more correct, as the Name is a full URI including parent resources). At the schema level this is enforced via a regex like `^.*/default$`. We can recognize these cases and handle them; but that will be a different PR—we don’t yet support type validation properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant