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 SQL Database SKU and MaxSizeBytes #1235

Merged
merged 3 commits into from
Jul 17, 2020

Conversation

matthchr
Copy link
Member

Closes #1226

What this PR does / why we need it:
Allow customers full control over SQL server SKU and MaxSize

If applicable:

  • this PR contains documentation
  • this PR contains tests

@Porges
Copy link
Member

Porges commented Jul 16, 2020

Seems to make sense 👍

@matthchr matthchr force-pushed the feature/sql-sku-support branch from f4d52e0 to f685204 Compare July 16, 2020 23:22
Porges
Porges previously approved these changes Jul 17, 2020
@frodopwns
Copy link
Contributor

@matthchr because the spec changed here you will need to update the helm templates

make helm-chart-manifests

then commit the changed files

Copy link
Contributor

@frodopwns frodopwns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update helm templates before merge

@frodopwns
Copy link
Contributor

Probably should also update the sample manifest and/or the docs https://github.com/Azure/azure-service-operator/blob/master/config/samples/azure_v1beta1_azuresqldatabase.yaml

return future.Response(), err
}

// AddLongTermRetention enables / disables long term retention
func (_ *AzureSqlDbManager) AddLongTermRetention(ctx context.Context, resourceGroupName string, serverName string, databaseName string, weeklyRetention string, monthlyRetention string, yearlyRetention string, weekOfYear int32) (*http.Response, error) {

longTermClient, err := azuresqlshared.GetBackupLongTermRetentionPoliciesClient()
// TODO: Probably shouldn't return a response at all in the err case here (all through this function)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at times there have been attempts to make the Response more user friendly so we could rely on it for error handling. In the end we have had to just use data embedded in the error types.

Copy link
Contributor

@frodopwns frodopwns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't require edition now

@@ -22,13 +49,16 @@ type AzureSqlDatabaseSpec struct {
// +kubebuilder:validation:Required
ResourceGroup string `json:"resourceGroup"`
Server string `json:"server"`
Edition DBEdition `json:"edition"`
Edition DBEdition `json:"edition"` // TODO: Remove this in v1beta2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this now needs to include omitempty

@matthchr matthchr force-pushed the feature/sql-sku-support branch 3 times, most recently from 1cf6e02 to 77dbad2 Compare July 17, 2020 19:56
@matthchr matthchr force-pushed the feature/sql-sku-support branch from 77dbad2 to d1878fd Compare July 17, 2020 21:07
Copy link
Contributor

@frodopwns frodopwns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@matthchr matthchr merged commit a926a79 into Azure:master Jul 17, 2020
@matthchr matthchr deleted the feature/sql-sku-support branch July 17, 2020 21:51
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

Successfully merging this pull request may close these issues.

Add support for AzureSQLDatabase SKU and disk size
3 participants