Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions config/tablet/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ init:
timeoutSeconds: 60 # init_timeout

db:
socket: # db_socket
host: # db_host
port: 0 # db_port
charSet: # db_charset
flags: 0 # db_flags
flavor: # db_flavor
sslCa: # db_ssl_ca
sslCaPath: # db_ssl_ca_path
sslCert: # db_ssl_cert
sslKey: # db_ssl_key
serverName: # db_server_name
connectTimeoutMilliseconds: 0 # db_connect_timeout_ms
socket: # db-socket
host: # db-host
port: 0 # db-port
charSet: # db-charset
flags: 0 # db-flags
flavor: # db-flavor
sslCa: # db-ssl-ca
sslCaPath: # db-ssl-ca-path
sslCert: # db-ssl-cert
sslKey: # db-ssl-key
serverName: # db-server-name
connectTimeoutMilliseconds: 0 # db-connect-timeout-ms
app:
user: vt_app # db_app_user
password: # db_app_password
useSsl: true # db_app_use_ssl
preferTcp: false
dba:
user: vt_dba # db_dba_user
password: # db_dba_password
useSsl: true # db_dba_use_ssl
user: vt_dba # db-dba-user
password: # db-dba-password
useSsl: true # db-dba-use-ssl
preferTcp: false
filtered:
user: vt_filtered # db_filtered_user
Expand Down
2 changes: 1 addition & 1 deletion docker/vttestserver/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ rm -vf "$VTDATAROOT"/"$tablet_dir"/{mysql.sock,mysql.sock.lock}
--num_shards "$NUM_SHARDS" \
--mysql_bind_host "${MYSQL_BIND_HOST:-127.0.0.1}" \
--vtcombo-bind-host "${VTCOMBO_BIND_HOST:-127.0.0.1}" \
--mysql_server_version "${MYSQL_SERVER_VERSION:-$1}" \
--mysql-server-version "${MYSQL_SERVER_VERSION:-$1}" \
--charset "${CHARSET:-utf8mb4}" \
--foreign_key_mode "${FOREIGN_KEY_MODE:-allow}" \
--enable_online_ddl="${ENABLE_ONLINE_DDL:-true}" \
Expand Down
4 changes: 2 additions & 2 deletions examples/compose/docker-compose.beginners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ services:
# TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation
$TOPOLOGY_FLAGS \
--cell $CELL \
--service_map 'grpc-vtctl,grpc-vtctld' \
--service-map 'grpc-vtctl,grpc-vtctld' \
--backup_storage_implementation file \
--file_backup_storage_root /vt/vtdataroot/backups \
--logtostderr=true \
Expand Down Expand Up @@ -100,7 +100,7 @@ services:
--cell $CELL \
--cells_to_watch $CELL \
--tablet_types_to_wait PRIMARY,REPLICA \
--service_map 'grpc-vtgateservice' \
--service-map 'grpc-vtgateservice' \
--enable_system_settings=true \
"]
volumes:
Expand Down
4 changes: 2 additions & 2 deletions examples/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ services:
- -c
- ' /vt/bin/vtctld --topo-implementation consul --topo-global-server-address consul1:8500
--topo-global-root vitess/global --cell test
--service_map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file --file_backup_storage_root
--service-map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file --file_backup_storage_root
/vt/vtdataroot/backups --logtostderr=true --port 8080 --grpc-port 15999 '
depends_on:
external_db_host:
Expand All @@ -156,7 +156,7 @@ services:
- '/script/run-forever.sh /vt/bin/vtgate --topo-implementation consul --topo-global-server-address
consul1:8500 --topo-global-root vitess/global --logtostderr=true --port 8080 --grpc-port
15999 --mysql_server_port 15306 --mysql_auth_server_impl none --cell test --cells_to_watch
test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service_map ''grpc-vtgateservice''
test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service-map ''grpc-vtgateservice''
--normalize_queries=true '
depends_on:
- vtctld
Expand Down
4 changes: 2 additions & 2 deletions examples/compose/vtcompose/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ services:
- -c
- ' /vt/bin/vtctld --topo-implementation consul --topo-global-server-address consul1:8500
--topo-global-root vitess/global --cell test
--service_map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file
--service-map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file
--file_backup_storage_root /vt/vtdataroot/backups --logtostderr=true --port
8080 --grpc-port 15999 '
depends_on:
Expand All @@ -172,7 +172,7 @@ services:
- '/script/run-forever.sh /vt/bin/vtgate --topo-implementation consul --topo-global-server-address
consul1:8500 --topo-global-root vitess/global --logtostderr=true --port 8080
--grpc-port 15999 --mysql_server_port 15306 --mysql_auth_server_impl none --cell
test --cells_to_watch test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service_map
test --cells_to_watch test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service-map
''grpc-vtgateservice'' --normalize_queries=true '
depends_on:
- vtctld
Expand Down
4 changes: 2 additions & 2 deletions examples/compose/vtcompose/vtcompose.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ func generateVtctld(opts vtOptions) string {
command: ["sh", "-c", " /vt/bin/vtctld \
%[3]s \
--cell %[4]s \
--service_map 'grpc-vtctl,grpc-vtctld' \
--service-map 'grpc-vtctl,grpc-vtctld' \
--backup_storage_implementation file \
--file_backup_storage_root /vt/vtdataroot/backups \
--logtostderr=true \
Expand Down Expand Up @@ -671,7 +671,7 @@ func generateVtgate(opts vtOptions) string {
--cell %[5]s \
--cells_to_watch %[5]s \
--tablet_types_to_wait PRIMARY,REPLICA,RDONLY \
--service_map 'grpc-vtgateservice' \
--service-map 'grpc-vtgateservice' \
--normalize_queries=true \
"]
volumes:
Expand Down
4 changes: 2 additions & 2 deletions examples/operator/101_initial_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
cells:
- zone1
extraFlags:
security_policy: read-only
security-policy: read-only
replicas: 1
resources:
limits:
Expand Down Expand Up @@ -100,7 +100,7 @@ spec:
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
db-charset: utf8mb4
resources:
limits:
memory: 256Mi
Expand Down
6 changes: 3 additions & 3 deletions examples/operator/201_customer_tablets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
cells:
- zone1
extraFlags:
security_policy: read-only
security-policy: read-only
replicas: 1
resources:
limits:
Expand Down Expand Up @@ -96,7 +96,7 @@ spec:
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
db-charset: utf8mb4
resources:
limits:
memory: 256Mi
Expand Down Expand Up @@ -131,7 +131,7 @@ spec:
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
db-charset: utf8mb4
resources:
limits:
memory: 256Mi
Expand Down
8 changes: 4 additions & 4 deletions examples/operator/302_new_shards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
cells:
- zone1
extraFlags:
security_policy: read-only
security-policy: read-only
replicas: 1
resources:
limits:
Expand Down Expand Up @@ -96,7 +96,7 @@ spec:
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
db-charset: utf8mb4
resources:
limits:
memory: 256Mi
Expand Down Expand Up @@ -131,7 +131,7 @@ spec:
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
db-charset: utf8mb4
resources:
limits:
memory: 256Mi
Expand Down Expand Up @@ -162,7 +162,7 @@ spec:
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
db-charset: utf8mb4
resources:
limits:
memory: 256Mi
Expand Down
6 changes: 3 additions & 3 deletions examples/operator/306_down_shard_0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
cells:
- zone1
extraFlags:
security_policy: read-only
security-policy: read-only
replicas: 1
resources:
limits:
Expand Down Expand Up @@ -96,7 +96,7 @@ spec:
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
db-charset: utf8mb4
resources:
limits:
memory: 256Mi
Expand Down Expand Up @@ -131,7 +131,7 @@ spec:
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
db-charset: utf8mb4
resources:
limits:
memory: 256Mi
Expand Down
6 changes: 3 additions & 3 deletions examples/operator/401_scheduled_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
cells:
- zone1
extraFlags:
security_policy: read-only
security-policy: read-only
replicas: 1
resources:
limits:
Expand Down Expand Up @@ -130,7 +130,7 @@ spec:
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
db-charset: utf8mb4
wait_for_backup_interval: "0"
resources:
limits:
Expand Down Expand Up @@ -166,7 +166,7 @@ spec:
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
db-charset: utf8mb4
wait_for_backup_interval: "0"
resources:
limits:
Expand Down
7 changes: 4 additions & 3 deletions go/acl/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ limitations under the License.
// own policy as a package that calls RegisterPolicy(), and compile it into all
// Vitess binaries that you use.
//
// By default (when no security_policy is specified), everyone is allowed to do
// By default (when no security-policy is specified), everyone is allowed to do
// anything.
//
// For convenience, there are two other built-in policies that also do NOT do
Expand All @@ -43,6 +43,7 @@ import (
"github.com/spf13/pflag"

"vitess.io/vitess/go/vt/log"
"vitess.io/vitess/go/vt/utils"
)

// This is a list of predefined roles. Applications are free
Expand Down Expand Up @@ -70,7 +71,7 @@ type Policy interface {
}

func RegisterFlags(fs *pflag.FlagSet) {
fs.StringVar(&securityPolicy, "security_policy", securityPolicy, "the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)")
utils.SetFlagStringVar(fs, &securityPolicy, "security-policy", securityPolicy, "the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only)")
}

// RegisterPolicy registers a security policy. This function must be called
Expand All @@ -94,7 +95,7 @@ func savePolicy() {
currentPolicy = policy
return
}
log.Warningf("security_policy %q not found; using fallback policy (deny-all)", securityPolicy)
log.Warningf("security-policy %q not found; using fallback policy (deny-all)", securityPolicy)
currentPolicy = denyAllPolicy{}
}

Expand Down
4 changes: 2 additions & 2 deletions go/acl/acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ func TestRegisterFlags(t *testing.T) {

RegisterFlags(testFs)

securityPolicyFlag := testFs.Lookup("security_policy")
assert.NotNil(t, securityPolicyFlag, "no security_policy flag is registered")
securityPolicyFlag := testFs.Lookup("security-policy")
assert.NotNil(t, securityPolicyFlag, "no security-policy flag is registered")

// Check the default value of the flag
want := "test"
Expand Down
2 changes: 1 addition & 1 deletion go/acl/deny_all_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"net/http"
)

var errDenyAll = errors.New("not allowed: deny-all security_policy enforced")
var errDenyAll = errors.New("not allowed: deny-all security-policy enforced")

// denyAllPolicy rejects all access.
type denyAllPolicy struct{}
Expand Down
2 changes: 1 addition & 1 deletion go/acl/read_only_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"net/http"
)

var errReadOnly = errors.New("not allowed: read-only security_policy enforced")
var errReadOnly = errors.New("not allowed: read-only security-policy enforced")

// readOnlyPolicy allows DEBUGGING and MONITORING roles for everyone,
// while denying any other roles (e.g. ADMIN) for everyone.
Expand Down
5 changes: 3 additions & 2 deletions go/cmd/vtcombo/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,10 @@ func run(cmd *cobra.Command, args []string) (err error) {
// Tablet configuration and init.
// Send mycnf as nil because vtcombo won't do backups and restores.
//
// Also force the `--tablet_manager_protocol` and `--tablet_protocol` flags
// Also force the `--tablet-manager-protocol` and `--tablet_protocol` flags
// to be the "internal" protocol that InitTabletMap registers.
cmd.Flags().Set("tablet_manager_protocol", "internal")

cmd.Flags().Set("tablet-manager-protocol", "internal")
cmd.Flags().Set("tablet_protocol", "internal")
uid, err := vtcombo.InitTabletMap(env, ts, &tpb, mysqld, &dbconfigs.GlobalDBConfigs, schemaDir, startMysql, srvTopoCounts)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions go/cmd/vtctld/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ It is usually the first Vitess component to be started after a valid global topo

For the last several releases, vtctld has been transitioning to a newer gRPC service for well-typed cluster management requests.
This is **required** to use programs such as vtadmin and vtctldclient, and The old API and service are deprecated and will be removed in a future release.
To enable this newer service, include "grpc-vtctld" in the --service_map argument.
To enable this newer service, include "grpc-vtctld" in the --service-map argument.
This is demonstrated in the example usage below.`,
Example: `vtctld \
--topo-implementation etcd2 \
--topo-global-server-address localhost:2379 \
--topo-global-root /vitess/ \
--service_map 'grpc-vtctl,grpc-vtctld' \
--service-map 'grpc-vtctl,grpc-vtctld' \
--backup_storage_implementation file \
--file_backup_storage_root $VTDATAROOT/backups \
--port 15000 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"vitess.io/vitess/go/cmd/vtctldclient/command/vreplication/common"
"vitess.io/vitess/go/mysql/config"
"vitess.io/vitess/go/vt/topo/topoproto"
"vitess.io/vitess/go/vt/utils"
)

var (
Expand All @@ -48,7 +49,7 @@ func registerCommands(root *cobra.Command) {
create.MarkFlagRequired("source-keyspace")
create.Flags().Var(&createOptions.TableSettings, "table-settings", "A JSON array defining what tables to materialize using what select statements. See the --help output for more details.")
create.Flags().BoolVar(&common.CreateOptions.StopAfterCopy, "stop-after-copy", false, "Stop the workflow after it's finished copying the existing rows and before it starts replicating changes.")
create.Flags().StringVar(&common.CreateOptions.MySQLServerVersion, "mysql_server_version", fmt.Sprintf("%s-Vitess", config.DefaultMySQLVersion), "Configure the MySQL version to use for example for the parser.")
utils.SetFlagStringVar(create.Flags(), &common.CreateOptions.MySQLServerVersion, "mysql-server-version", fmt.Sprintf("%s-Vitess", config.DefaultMySQLVersion), "Configure the MySQL version to use for example for the parser.")
create.Flags().IntVar(&common.CreateOptions.TruncateUILen, "sql-max-length-ui", 512, "truncate queries in debug UIs to the given length (default 512)")
create.Flags().IntVar(&common.CreateOptions.TruncateErrLen, "sql-max-length-errors", 0, "truncate queries in error logs to the given length (default unlimited)")
create.Flags().StringSliceVarP(&common.CreateOptions.ReferenceTables, "reference-tables", "r", nil, "Used to specify the reference tables to materialize on every target shard.")
Expand Down
4 changes: 2 additions & 2 deletions go/cmd/vtgate/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ var (
--cell test \
--cells_to_watch test \
--tablet_types_to_wait PRIMARY,REPLICA \
--service_map 'grpc-vtgateservice' \
--pid_file $VTDATAROOT/tmp/vtgate.pid \
--service-map 'grpc-vtgateservice' \
--pid-file $VTDATAROOT/tmp/vtgate.pid \
--mysql_auth_server_impl none`,
Args: cobra.NoArgs,
Version: servenv.AppVersion.String(),
Expand Down
2 changes: 1 addition & 1 deletion go/cmd/vttablet/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ vttablet \
--init_tablet_type $tablet_type \
--port $port \
--grpc-port $grpc_port \
--service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream'` + "\n\n`$alias` needs to be of the form: `<cell>-id`, and the cell should match one of the local cells that was created in the topology. The id can be left padded with zeroes: `cell-100` and `cell-000000100` are synonymous.",
--service-map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream'` + "\n\n`$alias` needs to be of the form: `<cell>-id`, and the cell should match one of the local cells that was created in the topology. The id can be left padded with zeroes: `cell-100` and `cell-000000100` are synonymous.",
Args: cobra.NoArgs,
Version: servenv.AppVersion.String(),
PreRunE: servenv.CobraPreRunE,
Expand Down
Loading
Loading