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

Configurable timeouts and synchronisation intervals #117

Merged
merged 1 commit into from
May 14, 2020

Conversation

kuritka
Copy link
Collaborator

@kuritka kuritka commented May 12, 2020

resolves #82

remove pkg/test (already covered by terratest) and helpers.go from /pkg/controller/gslb/

add depresolver

  • abstracts multiple configurations into single point of access
  • provides predefined values when configuration is missing
  • validates configuration
  • executes once

covered by unit tests

created internal to split logic into maintainable packages and reduce public API surface

move YamlToGslb into internal utils (reusing YamlToGslb within depresolver tests)

Update controller, tests, terratests to be able to use depresolver

add configuration for

  • DnsTtlSeconds
  • SplitBrainThresholdSeconds
  • ExternalDNSSyncSeconds
  • ReconcileRequeueSeconds
  • can be extended for other inputs

@kuritka kuritka force-pushed the #82-configurable-timeouts-MERGE branch 2 times, most recently from 165f226 to ebba8ad Compare May 12, 2020 11:11
Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

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

@kuritka looks very cool. While I'm going through a deeper review, could you please rebase with recent master and make some whitespace busting on the way ?

git rebase master
First, rewinding head to replay your work on top of it...
Applying: Configurable timeouts and synchronisation intervals
Using index info to reconstruct a base tree...
M	go.mod
M	go.sum
M	pkg/controller/gslb/gslb_controller_test.go
.git/rebase-apply/patch:74: new blank line at EOF.
+
.git/rebase-apply/patch:781: new blank line at EOF.
+
.git/rebase-apply/patch:821: new blank line at EOF.
+
.git/rebase-apply/patch:859: new blank line at EOF.
+
.git/rebase-apply/patch:898: new blank line at EOF.
+
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging pkg/controller/gslb/gslb_controller_test.go
Auto-merging go.sum
Auto-merging go.mod

Thanks!

@kuritka kuritka force-pushed the #82-configurable-timeouts-MERGE branch 2 times, most recently from d69f7d6 to 568c0e5 Compare May 13, 2020 09:19
@kuritka kuritka requested a review from ytsarev May 13, 2020 09:42
Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

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

Small inline documentation nitpick. Otherwise looks totally great 👍

@kuritka kuritka force-pushed the #82-configurable-timeouts-MERGE branch from 568c0e5 to fc3ab54 Compare May 14, 2020 07:04
@kuritka kuritka requested a review from ytsarev May 14, 2020 07:19
ytsarev
ytsarev previously approved these changes May 14, 2020
Copy link
Contributor

@somaritane somaritane left a comment

Choose a reason for hiding this comment

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

@kuritka , looks good to me, just a minor one from me regarding make and GH actions test targets.

resolves #82

remove `pkg/test` (already covered by terratest) and move `helpers.go` from `/pkg/controller/gslb/` to `/pkg/controller/gslb/internal/`

add depresolver
 - abstracts multiple configurations into single point of access
 - provides predefined values when configuration is missing
 - validates configuration
 - executes once

covered by unit tests

created `internal` to split logic into maintainable packages and reduce public API surface

move `YamlToGslb` into `internal utils` (reusing `YamlToGslb` within depresolver tests)

Update controller, tests, terratests to be able to use depresolver

add configuration for
 - DnsTtlSeconds
 - SplitBrainThresholdSeconds
 - ExternalDNSSyncSeconds
 - ReconcileRequeueSeconds
 - _can be extended for other inputs_
@kuritka kuritka force-pushed the #82-configurable-timeouts-MERGE branch from fc3ab54 to f927a81 Compare May 14, 2020 12:21
@kuritka kuritka merged commit 090c057 into master May 14, 2020
@kuritka kuritka deleted the #82-configurable-timeouts-MERGE branch May 15, 2020 12:19
@kuritka kuritka restored the #82-configurable-timeouts-MERGE branch May 18, 2020 07:36
@kuritka kuritka deleted the #82-configurable-timeouts-MERGE branch May 18, 2020 07:38
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.

Make Gslb timeouts and synchronisation intervals configurable
3 participants