-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
//+kubebuilder:default:=false | ||
//+optional | ||
ForceTcp bool `json:"forceTcp"` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
force_tcp - false
keep_socket - true
@@ -11,7 +11,9 @@ | |||
chyt={ | |||
"address_resolver"={ | |||
"enable_ipv4"=%true; | |||
"enable_ipv6"=%true; | |||
"enable_ipv6"=%false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cause of
- https://github.com/ytsaurus/ytsaurus-k8s-operator/pull/324/files#diff-9875b847729a36cdf9f8ee8333cefa406ed3e7fb1f5f297c87e5e3e556d907bbR558
- https://github.com/ytsaurus/ytsaurus-k8s-operator/pull/324/files#diff-ee85a92ac74a0dc4dbb84dab8829fe475be259f340407f523529d5dda26961ddR315-R317
and maybe it should be done another way
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thanks, will look into it soon. |
There was a problem hiding this 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; |
There was a problem hiding this comment.
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
pkg/ytconfig/generator_test.go
Outdated
forceTCP := true | ||
keepSocket := true | ||
ytsaurus.Spec.CommonSpec.ForceTCP = &forceTCP | ||
ytsaurus.Spec.CommonSpec.KeepSocket = &keepSocket |
There was a problem hiding this comment.
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.
pkg/ytconfig/generator.go
Outdated
c := getStrawberryController() | ||
var resolver AddressResolver | ||
g.fillAddressResolver(&resolver) | ||
c := getStrawberryController(&resolver) |
There was a problem hiding this comment.
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.
Sent a commit with fixes |
No description provided.