Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
When connection secret doesn't contain
port
, this change assumes default port for MySQL, 3306.This is needed because provider-aws doesn't write port (by default) to the connection secret for Aurora DB cluster. Provider-sql shouldn't accept the empty string as it is an invalid value for port, and assume that a missing value should default to the standard port.
Fixes #76
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
[Testing incomplete]
I ran
make run
locally, which caused a local reconciler to run in parallel with the one in the kubernetes cluster.When describing the
user.mysql
on the kubernetes cluster, I see (messages only, for readability):The change sets the port correctly. The connection to db_host:3306 is open, so I would expect that the user is created. The problem seem not to be related to my change, but I would need some assistance in figuring this out. The debug output contains (newlines added manually):
I checked that the port 3306 is part of
c.db
inObserve
. I suspect that the issue with connection comes from the interaction of the two reconcilers.