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

Consolidate some probe code #373

Merged
merged 11 commits into from
Jul 19, 2022
Merged

Conversation

burmanm
Copy link
Contributor

@burmanm burmanm commented Jul 14, 2022

What this PR does:
Adds back the terminate test for drain test and consolidates from probe and presto hook URL paths.

Which issue(s) this PR fixes:
Fixes #377

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CHANGELOG.md updated (not required for documentation PRs)
  • CLA Signed: DataStax CLA

burmanm added 2 commits July 13, 2022 18:58
…in different packages, upgrade mutual MTLS test to use 4.0.4 instead of 3.11.7
@burmanm burmanm requested a review from a team as a code owner July 14, 2022 15:18
@@ -214,7 +214,7 @@ endif

.PHONY: cert-manager
cert-manager: ## Install cert-manager to the cluster
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.0/cert-manager.yaml
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.2/cert-manager.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to keep common deps in sync between cass-operator and k8ssandra-operator. Can you upgrade cert-manager in k8ssandra-operator as well?

@@ -171,7 +170,8 @@ func (provider *InsecureManagementApiSecurityProvider) BuildMgmtApiWgetAction(en
"wget",
"--output-document", "/dev/null",
"--no-check-certificate",
fmt.Sprintf("http://%s", endpoint),
"--timeout 20",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the timeout be configurable?

@@ -185,7 +185,8 @@ func (provider *ManualManagementApiSecurityProvider) BuildMgmtApiWgetAction(endp
"--certificate", tlsCrt,
"--private-key", tlsKey,
"--ca-certificate", caCertPath,
fmt.Sprintf("https://%s", endpoint),
"--timeout 20",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the timeout be configurable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really, we don't allow configuring other mgmt-api timeouts in the code either.

Copy link
Contributor

Choose a reason for hiding this comment

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

A hard coded value seems less than ideal. If someone, even for dev/testings needs to adjust it is going require building a new image. What about making it configurable through the operator config map?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would make it inconsistent with the httpGet calls we have as well as all the client.go (management-api communications), they're not configurable either.

We can make a ticket to configure all those, but that will require quite a lot of work and break APIs for all users of management-api client.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a commit that allows it. It will break backwards compatibility, so I wouldn't backport it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Before you pushed the commit I was about reply saying I am ok punting if you think it is unnecessary :)

@@ -196,8 +197,9 @@ func (provider *InsecureManagementApiSecurityProvider) BuildMgmtApiWgetPostActio
"wget",
"--output-document", "/dev/null",
"--no-check-certificate",
"--timeout 20",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the timeout be configurable?

@@ -211,8 +213,9 @@ func (provider *ManualManagementApiSecurityProvider) BuildMgmtApiWgetPostAction(
"--certificate", tlsCrt,
"--private-key", tlsKey,
"--ca-certificate", caCertPath,
"--timeout 20",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the timeout be configurable?

@jsanda
Copy link
Contributor

jsanda commented Jul 15, 2022

@burmanm Can you also create an issue for this with some details on why the wget calls are made and why it's a good idea to add the timeouts?

@jsanda
Copy link
Contributor

jsanda commented Jul 16, 2022

Changes look good other than the failing tests.

@burmanm burmanm merged commit 138c961 into k8ssandra:master Jul 19, 2022
burmanm added a commit that referenced this pull request Jul 19, 2022
* Add timeout to all wget calls

* Make probe timeouts configurable when using mutual auth

* Remove deprecated BuildNameToCertificate call
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.

Probe wget calls are missing a timeout
2 participants