-
Notifications
You must be signed in to change notification settings - Fork 95
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
Remove --http-port and --port from the cockroach operator #1058
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1086,13 +1086,20 @@ spec: | |
type: boolean | ||
type: object | ||
grpcPort: | ||
description: '(Optional) The database port (`--port` CLI parameter | ||
when starting the service) Default: 26258' | ||
description: '(Optional) The database port (`--listen-addr` CLI parameter | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these changes backwards compatible? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. I have only changed the description and not the field so it is backward compatible. |
||
when starting the service) Default: 26258 Deprecated: Use ListenAddr | ||
instead of GRPCPort' | ||
format: int32 | ||
type: integer | ||
httpAddr: | ||
description: '(Optional) The IP address/hostname and port on which | ||
to listen for DB Console HTTP requests. (`--http-addr` CLI parameter | ||
when starting the service) Default: ":8080"' | ||
type: string | ||
httpPort: | ||
description: '(Optional) The web UI port (`--http-port` CLI parameter | ||
when starting the service) Default: 8080' | ||
description: '(Optional) The web UI port (`--http-addr` CLI parameter | ||
when starting the service) Default: 8080 Deprecated: Use HTTPAddr | ||
instead of HTTPPort' | ||
format: int32 | ||
type: integer | ||
image: | ||
|
@@ -1214,6 +1221,10 @@ spec: | |
- host | ||
type: object | ||
type: object | ||
listenAddr: | ||
description: '(Optional) The database port (`--listen-addr` CLI parameter | ||
when starting the service) Default: ":26258"' | ||
type: string | ||
logConfigMap: | ||
description: '(Optional) LogConfigMap define the config map which | ||
contains log configuration used to send the logs through the proper | ||
|
@@ -1389,8 +1400,13 @@ spec: | |
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' | ||
type: object | ||
type: object | ||
sqlAddr: | ||
description: '(Optional) The IP address/hostname and port on which | ||
to listen for SQL connections from clients. Default: ":26257"' | ||
type: string | ||
sqlPort: | ||
description: '(Optional) The SQL Port number Default: 26257' | ||
description: '(Optional) The SQL Port number Default: 26257 Deprecated: | ||
Use SQLAddr instead of SQLPort' | ||
format: int32 | ||
type: integer | ||
tlsEnabled: | ||
|
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.
How does this work, I'm not super familiar with it. Do we need to persist the spec somewhere? I know we pull it often from the k8s api, do we need to update it if we change some of the values here?
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.
This Default() func always gets called in mutating configuration so whenever a create or update request comes on this func gets called and the changes we mutate on crdbCluster goes to apiserver and it gets persisted to etcd.
Now when in controller you get the crdbcluster object from apiserver it returns the object with all the mutation we did in Default() func.
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 if I do
kubectl get crdbcluster foo -o yaml
I'll seelistenAddr
set now?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.
Yes. If you create a crdbcluster CR with these changes you will see the listenAddr, httpAddr and sqlAddr set.
If you have old CR, then you don't see it (so no automatic rolling restart). However as soon as you update that CR with new image, your rolling restart will happen and now you see addresses instead of ports.