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 the option to set a reported hostname (MySQL) #10687

Merged
merged 8 commits into from
Dec 28, 2021

Conversation

alexbarksdale
Copy link
Member

@alexbarksdale alexbarksdale commented Nov 18, 2021

What does this PR do?

Adds a new optional config (display_hostname) to set the displayed hostname in MySQL. This mechanism overrides the resolved db hostname.

Motivation

There are some unique cases where the resolved hostname does not (or should not) match the desired hostname.
e.g A local proxy proxying ports to multiple instances or the host is an IP address.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@codecov
Copy link

codecov bot commented Nov 18, 2021

Codecov Report

Merging #10687 (62da7cf) into master (2ea699d) will increase coverage by 0.00%.
The diff coverage is 96.29%.

Flag Coverage Δ
mysql 87.17% <96.29%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@alexbarksdale alexbarksdale marked this pull request as ready for review November 19, 2021 04:11
@alexbarksdale alexbarksdale requested review from a team as code owners November 19, 2021 04:11
sarina-dd
sarina-dd previously approved these changes Nov 19, 2021
@alexbarksdale alexbarksdale changed the title Add the option to set a display hostname (MySQL) Add the option to set a reported hostname (MySQL) Nov 22, 2021
@@ -50,6 +50,12 @@ files:
type: number
example: 3306

- name: reported_hostname
description: |
Set the reported hostname for this instance.
Copy link
Contributor

Choose a reason for hiding this comment

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

See my note here: #10682 (comment)

justiniso
justiniso previously approved these changes Nov 22, 2021
sarina-dd
sarina-dd previously approved these changes Nov 22, 2021
hithwen
hithwen previously approved these changes Nov 23, 2021
@alexbarksdale alexbarksdale merged commit ebf8c71 into master Dec 28, 2021
@alexbarksdale alexbarksdale deleted the alex.barksdale/add-display-hostname-mysql branch December 28, 2021 20:03
cswatt pushed a commit that referenced this pull request Jan 5, 2022
* Add display_hostname config option

* Use configured display hostname if applicable

* Add a dbm enabled case for display_hostname

* Update description

* Update option name to reported_hostname

* Update config description

* Fix merge conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants