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

[WIP] Added the field of EnableCertReloadInterval: true everywhere it is used and in the function #6525

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ADI-ROXX
Copy link
Contributor

@ADI-ROXX ADI-ROXX commented Jan 11, 2025

Which problem is this PR solving?

Description of the changes

  • Added the field EnableCertReloadInterval: true everywhere ServerFlagsConfig is used
  • As a dual check for future use, set the value of c.EnableCertReloadInterval to true in AddFlags function in pkg/config/tlscfg/flags.go

How was this change tested?

Checklist

Signed-off-by: cs-308-2023 <adityaruhela2003@gmail.com>
@ADI-ROXX ADI-ROXX requested a review from a team as a code owner January 11, 2025 14:15
@ADI-ROXX ADI-ROXX requested a review from albertteoh January 11, 2025 14:15
Signed-off-by: cs-308-2023 <adityaruhela2003@gmail.com>
@ADI-ROXX
Copy link
Contributor Author

ADI-ROXX commented Jan 11, 2025

@yurishkuro Some tests are failing because of the changes that are made. Most probably it is because the tests defined are not expecting reload-interval to be true.

So to solve that, I think the way ahead is to make changes in the tests that were failing

Signed-off-by: cs-308-2023 <adityaruhela2003@gmail.com>
@ADI-ROXX
Copy link
Contributor Author

@yurishkuro I have removed the EnableCertReloadInterval from everywhere. Can you check now. Some test cases are failing though since they are made for EnableCertReloadInterval=false.

pkg/config/tlscfg/flags.go Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
pkg/config/tlscfg/flags_test.go Outdated Show resolved Hide resolved
pkg/config/tlscfg/flags_test.go Outdated Show resolved Hide resolved
@@ -131,13 +131,11 @@ func TestServerCertReloadInterval(t *testing.T) {
{
config: ServerFlagsConfig{
Prefix: "enabled",
EnableCertReloadInterval: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need this test anymore. We can just move the parsing of this flag to TestServerFlags

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So shall I remove this test completely?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ADI-ROXX Yeah - I think we can remove this test but we don't want to lose coverage of this flag. So we can add this flag as part of the test setup in TestServerFlags.

Signed-off-by: cs-308-2023 <adityaruhela2003@gmail.com>
Signed-off-by: cs-308-2023 <adityaruhela2003@gmail.com>
@@ -0,0 +1,13 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

What is this file doing here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is removed in the newer commit.

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.

Always include reload-interval option for TLS config
3 participants