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

Update dns suffix/fully qualified name based on the cloud environment or from the created object #946

Merged
merged 13 commits into from
Apr 21, 2020

Conversation

jananivMS
Copy link
Contributor

Closes #672

What this PR does / why we need it:

  • The dns suffix for SQL database differs based on the cloud environment. This is used in the fully qualified server name in Azure SQL server secret, in the listener endpoints in the Failovergroup secret and in the sql user secret. These are updated to use the SQLdatabaseDNSSuffix defined in the Cloud environment
  • The postgreSQL fully qualified server name needs to be retrieved from the created server object so it is accurate (differs in different cloud environments)

Special notes for your reviewer:
Test the following operators in Public and China clouds and make sure the fields in the secrets only have environment appropriate strings (.com or .net for Public cloud, .cn or .chinacloudapi for ChinaCloud)

  • Azure SQL server
  • Azure Failovergroup
  • Azure SQL user
  • Postgresql server

How does this PR make you feel:
gif

If applicable:

  • this PR contains documentation
  • this PR contains tests

@jananivMS jananivMS changed the title WIP: Update dns suffix/fully qualified name based on the cloud environment or from the created object Update dns suffix/fully qualified name based on the cloud environment or from the created object Apr 15, 2020
@frodopwns frodopwns requested a review from buhongw7583c April 15, 2020 16:28
@buhongw7583c
Copy link
Contributor

Due to the quota limitation on China cloud, could use break points to check the dns suffix of secret for SQL server and SQL failover group (no need to create them successfully), which turned out to be correct: *.database.chinacloudapi.cn.

But could not verify on SQL user or psql server without creating them.

@jananivMS
Copy link
Contributor Author

@buhongw7583c I was able to validate Azure SQL server, Azure SQL user and PostgreSQL server on China Cloud. Can you please review the code and approve if it looks good to you?

buhongw7583c
buhongw7583c previously approved these changes Apr 20, 2020
pkg/resourcemanager/psql/server/server_reconcile.go Outdated Show resolved Hide resolved
@buhongw7583c buhongw7583c merged commit f664ca3 into Azure:master Apr 21, 2020
@buhongw7583c buhongw7583c deleted the cloud-suffix branch April 21, 2020 06:31
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.

Bug: Dns suffix URLs should be retrieved based on the cloud environment and not hardcoded
3 participants