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

Enable Dynamic Config Push #379

Merged
merged 17 commits into from
Jan 29, 2025
Merged

Enable Dynamic Config Push #379

merged 17 commits into from
Jan 29, 2025

Conversation

virajrk
Copy link
Collaborator

@virajrk virajrk commented Jan 22, 2025

Checklist

🚨 Please review this repository's contribution guidelines.

  • I've read and agree to the project's contribution guidelines.
  • I'm requesting to pull a topic/feature/bugfix branch.
  • I checked that my code additions will pass code linting checks and unit tests.
  • I updated unit and integration tests (if applicable).
  • I'm ready to notify the team of this contribution.

Description

Adding support for pushing dynamic config.

[Link to related ISSUE]

Thank you!

@virajrk virajrk force-pushed the dynamoDB branch 2 times, most recently from 16e3a1f to c4738fc Compare January 22, 2025 01:43
@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 64.48598% with 38 lines in your changes missing coverage. Please review.

Project coverage is 77.26%. Comparing base (6854f0a) to head (f80a46d).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
admiral/pkg/clusters/admiralDatabaseClient.go 59.09% 24 Missing and 3 partials ⚠️
admiral/pkg/clusters/types.go 37.50% 2 Missing and 3 partials ⚠️
admiral/pkg/clusters/dynamoDB.go 85.18% 2 Missing and 2 partials ⚠️
admiral/pkg/controller/common/config.go 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #379      +/-   ##
==========================================
+ Coverage   77.22%   77.26%   +0.03%     
==========================================
  Files          75       75              
  Lines       10420    10519      +99     
==========================================
+ Hits         8047     8127      +80     
- Misses       1958     1968      +10     
- Partials      415      424       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@virajrk virajrk force-pushed the dynamoDB branch 2 times, most recently from ffe28d8 to 14e2a5f Compare January 23, 2025 02:16
@virajrk virajrk marked this pull request as ready for review January 23, 2025 02:18
Copy link
Collaborator

@vinay-g vinay-g left a comment

Choose a reason for hiding this comment

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

2 items

  • I think we discussed having an interface so that OSS admiral will not have issues with Dynamo implementation
  • I understand the call section where your NLB logic will be invoked is not done, but are we going with running the update only for changed clusters or all ?

items, err := client.svc.Query(&dbQuery)

if err != nil {
return configData, fmt.Errorf("Failed to fetch dynamic config : %s", err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you make sure we have this is a format where we can easily search example task=DynamicConfigGet etc in the log

@@ -162,6 +164,12 @@ func NewRemoteRegistry(ctx context.Context, params common.AdmiralParams) *Remote
serviceEntrySuspender = NewDummyServiceEntrySuspender()
}

if common.IsAdmiralDynamicConfigEnable() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit pick can we make is IsAdmiralDynamicConfigEnabled

return false
}

if DynamicConfigCheckSum == sha256.Sum256([]byte(fmt.Sprintf("%v", config))) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit pick, we had checked m5s vs sha256 for speed and cpu, for a different requirement and chose md5 for being a little fast and consuming a little less CPU

$ openssl speed md5 sha256
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5              51896.59k   156143.77k   336557.91k   472481.13k   536428.54k   543648.43k
sha256           42111.47k   120368.74k   247776.17k   335801.69k   376607.34k   377296.21k

Comment on lines 281 to 283
rootCmd.PersistentFlags().StringVar(&params.NLBEnabledClusters, "nlb_enabled_clusters", "", "Comma seperated list of enabled clusters to be enabled for NLB")
rootCmd.PersistentFlags().StringVar(&params.NLBEnabledIdentityList, "nlb_enabled_identity_list", "", "Comma seperated list of enabled idenity list to be enabled for NLB")
rootCmd.PersistentFlags().StringVar(&params.CLBEnabledClusters, "clb_enabled_clusters", "", "Comma seperated list of enabled clusters to be enabled for CLB")
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this not be StringSliceVar ?

@virajrk virajrk force-pushed the dynamoDB branch 2 times, most recently from 15b99ac to 5fbda35 Compare January 28, 2025 00:20
Copy link
Collaborator

@vinay-g vinay-g left a comment

Choose a reason for hiding this comment

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

Looks good 👍

Viraj Kulkarni added 17 commits January 29, 2025 15:25
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
Signed-off-by: Viraj Kulkarni <[email protected]>
@virajrk virajrk merged commit 08133eb into istio-ecosystem:master Jan 29, 2025
1 of 2 checks passed
@virajrk virajrk deleted the dynamoDB branch February 11, 2025 17:32
@virajrk virajrk restored the dynamoDB branch February 11, 2025 17:33
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.

3 participants