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

add forceTcp and keepSocket options #324

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

leo-astorsky
Copy link
Contributor

No description provided.

//+kubebuilder:default:=false
//+optional
ForceTcp bool `json:"forceTcp"`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -11,7 +11,9 @@
chyt={
"address_resolver"={
"enable_ipv4"=%true;
"enable_ipv6"=%true;
"enable_ipv6"=%false;
Copy link
Contributor Author

@leo-astorsky leo-astorsky Aug 14, 2024

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

So it was hardcoded for strawberry, but now it is configured according to the common value, ok

Copy link
Collaborator

@l0kix2 l0kix2 Aug 21, 2024

Choose a reason for hiding this comment

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

On a second thought that may be backward incompatible change and maybe we need to think here more.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So users, who have ipv4=false;ipv6=true or ipv4=true;ipv6=false (assume false/false is invalid configuration) will redeploy strawberry on operator update with this settings, not true/true as before which can break things for them. Not sure yet how problematic such update could be.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose we can describe breaking changes in the next release about strawberry ipv4/6.

@l0kix2
Copy link
Collaborator

l0kix2 commented Aug 19, 2024

Thanks, will look into it soon.

api/v1/ytsaurus_types.go Outdated Show resolved Hide resolved
pkg/ytconfig/common.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@l0kix2 l0kix2 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 overall, I only have a couple of minor comments.

@@ -11,7 +11,9 @@
chyt={
"address_resolver"={
"enable_ipv4"=%true;
"enable_ipv6"=%true;
"enable_ipv6"=%false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

So it was hardcoded for strawberry, but now it is configured according to the common value, ok

forceTCP := true
keepSocket := true
ytsaurus.Spec.CommonSpec.ForceTCP = &forceTCP
ytsaurus.Spec.CommonSpec.KeepSocket = &keepSocket
Copy link
Collaborator

Choose a reason for hiding this comment

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

ptr.To(..) can be used here for brevity, but it is minor.

c := getStrawberryController()
var resolver AddressResolver
g.fillAddressResolver(&resolver)
c := getStrawberryController(&resolver)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's pass not pointer but struct to getStrawberryController since we are not changing it inside that function and nil value there is unexpected and will cause panic, so safer and more straightforward is just to just pass resolver value here.

pkg/ytconfig/chyt.go Outdated Show resolved Hide resolved
@leo-astorsky
Copy link
Contributor Author

Sent a commit with fixes

@l0kix2 l0kix2 merged commit 8e953e7 into ytsaurus:main Aug 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants