-
Notifications
You must be signed in to change notification settings - Fork 27
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
*: adapt needs for operator support #76
Conversation
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
lib/config/file.go
Outdated
@@ -42,13 +42,13 @@ func NewNamespacesFromDir(nsdir string) (*NamespaceDir, error) { | |||
nspath: make(map[string]string), | |||
} | |||
|
|||
yamlFiles, err := listAllYamlFiles(c.dir) | |||
nFiles, err := listAllFiles(c.dir, ".toml") |
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.
Why change to toml files this time? Is it required by the operator?
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.
Kind of. Operator has built-in support for json and toml but not yaml. Weird enough that TiDB actually uses toml config file.... So config operator be like type no-lint/no-highlight toml in yaml files
.
Anyway, dynamic namespace will not be done by using configuration file(can not restart the proxy). Also this is duplicated with weirctl
.
It is not used at all, I removed this.
sigs.k8s.io/yaml v1.2.0 // indirect | ||
) | ||
|
||
replace github.com/pingcap/TiProxy/lib => ./lib |
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.
Why?
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.
Same reason as parser as sub module of tidb
. Can not test without pushing lib first. Golang reall sucks at multimodule and github workflow.
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe xw897002528@gmail.com
What problem does this PR solve?
Issue Number: ref #69
Problem Summary: A big PR including changes needed to adapt tidb-operator
What is changed and how it works:
go.mod
pkg
into/lib
. Otherwise tidb-operator is not able to importweirctl
due to the complex dependency conflicts.server.Run
returns no error--pub_addr
forweirproxy
to expose the correct advertise address in k8s, simplifyxxx-urls
config, tooweirproxy
, see Support tidb-operator and dev tier #69pingcap/log
inutil/security
Check List
Tests
Tested with k8s
Notable changes
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.