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

helm: use new commands #6052

Merged
merged 5 commits into from
Apr 16, 2020
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
5 changes: 1 addition & 4 deletions examples/helm/101_initial_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ topology:
tablets:
- type: "replica"
vttablet:
replicas: 2
- type: "rdonly"
vttablet:
replicas: 1
replicas: 3
schema:
initial: |-
create table product(
Expand Down
49 changes: 49 additions & 0 deletions examples/helm/201_customer_tablets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
topology:
cells:
- name: "zone1"
vtctld:
replicas: 1
vtgate:
replicas: 1
mysqlProtocol:
enabled: true
authType: "none"
keyspaces:
- name: "commerce"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 3
- name: "customer"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 3

vtctld:
serviceType: "NodePort"
resources:

vtgate:
serviceType: "NodePort"
resources:

vttablet:
mysqlSize: "prod"
resources:
mysqlResources:
# It's generally not recommended to override this value for production usage.
terminationGracePeriodSeconds: 1

vtworker:
resources:

pmm:
enabled: false

orchestrator:
enabled: false
54 changes: 54 additions & 0 deletions examples/helm/202_move_tables.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
topology:
cells:
- name: "zone1"
vtctld:
replicas: 1
vtgate:
replicas: 1
mysqlProtocol:
enabled: true
authType: "none"
keyspaces:
- name: "commerce"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 3
- name: "customer"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 3

jobs:
- name: "move-tables"
kind: "vtctlclient"
command: "MoveTables -workflow=commerce2customer commerce customer \'{\"customer\":{}, \"corder\":{}}\'"

vtctld:
serviceType: "NodePort"
resources:

vtgate:
serviceType: "NodePort"
resources:

vttablet:
mysqlSize: "prod"
resources:
mysqlResources:
# It's generally not recommended to override this value for production usage.
terminationGracePeriodSeconds: 1

vtworker:
resources:

pmm:
enabled: false

orchestrator:
enabled: false
57 changes: 57 additions & 0 deletions examples/helm/203_switch_reads.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
topology:
cells:
- name: "zone1"
vtctld:
replicas: 1
vtgate:
replicas: 1
mysqlProtocol:
enabled: true
authType: "none"
keyspaces:
- name: "commerce"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 3
- name: "customer"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 3

jobs:
- name: "mswitch1"
kind: "vtctlclient"
command: "SwitchReads -tablet_type=rdonly customer.commerce2customer"
- name: "mswitch2"
kind: "vtctlclient"
command: "SwitchReads -tablet_type=replica customer.commerce2customer"

vtctld:
serviceType: "NodePort"
resources:

vtgate:
serviceType: "NodePort"
resources:

vttablet:
mysqlSize: "prod"
resources:
mysqlResources:
# It's generally not recommended to override this value for production usage.
terminationGracePeriodSeconds: 1

vtworker:
resources:

pmm:
enabled: false

orchestrator:
enabled: false
54 changes: 54 additions & 0 deletions examples/helm/204_switch_writes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
topology:
cells:
- name: "zone1"
vtctld:
replicas: 1
vtgate:
replicas: 1
mysqlProtocol:
enabled: true
authType: "none"
keyspaces:
- name: "commerce"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 3
- name: "customer"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 3

jobs:
- name: "mswitch3"
kind: "vtctlclient"
command: "SwitchWrites customer.commerce2customer"

vtctld:
serviceType: "NodePort"
resources:

vtgate:
serviceType: "NodePort"
resources:

vttablet:
mysqlSize: "prod"
resources:
mysqlResources:
# It's generally not recommended to override this value for production usage.
terminationGracePeriodSeconds: 1

vtworker:
resources:

pmm:
enabled: false

orchestrator:
enabled: false
74 changes: 74 additions & 0 deletions examples/helm/205_clean_commerce.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
topology:
cells:
- name: "zone1"
vtctld:
replicas: 1
vtgate:
replicas: 1
mysqlProtocol:
enabled: true
authType: "none"
keyspaces:
- name: "commerce"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 3
schema:
postsplit: |-
drop table customer;
drop table corder;
vschema:
postsplit: |-
{
"tables": {
"product": {}
}
}
- name: "customer"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 3

jobs:
- name: "vclean1"
kind: "vtctlclient"
command: "SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 rdonly"
- name: "vclean2"
kind: "vtctlclient"
command: "SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 replica"
- name: "vclean3"
kind: "vtctlclient"
command: "SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 master"
- name: "vclean4"
kind: "vtctlclient"
command: "ApplyRoutingRules -rules=\'{}\'"

vtctld:
serviceType: "NodePort"
resources:

vtgate:
serviceType: "NodePort"
resources:

vttablet:
mysqlSize: "prod"
resources:
mysqlResources:
# It's generally not recommended to override this value for production usage.
terminationGracePeriodSeconds: 1

vtworker:
resources:

pmm:
enabled: false

orchestrator:
enabled: false
10 changes: 2 additions & 8 deletions examples/helm/301_customer_sharded.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ topology:
tablets:
- type: "replica"
vttablet:
replicas: 2
- type: "rdonly"
vttablet:
replicas: 1
replicas: 3
schema:
seq: |-
create table customer_seq(id int, next_id bigint, cache bigint, primary key(id)) comment 'vitess_sequence';
Expand All @@ -44,10 +41,7 @@ topology:
tablets:
- type: "replica"
vttablet:
replicas: 2
- type: "rdonly"
vttablet:
replicas: 1
replicas: 3
schema:
sharded: |-
alter table customer change customer_id customer_id bigint not null;
Expand Down
20 changes: 4 additions & 16 deletions examples/helm/302_new_shards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,26 @@ topology:
tablets:
- type: "replica"
vttablet:
replicas: 2
- type: "rdonly"
vttablet:
replicas: 1
replicas: 3
- name: "customer"
shards:
- name: "0"
tablets:
- type: "replica"
vttablet:
replicas: 2
- type: "rdonly"
vttablet:
replicas: 1
replicas: 3
- name: "-80"
tablets:
- type: "replica"
vttablet:
replicas: 2
- type: "rdonly"
vttablet:
replicas: 1
replicas: 3
copySchema:
source: "customer/0"
- name: "80-"
tablets:
- type: "replica"
vttablet:
replicas: 2
- type: "rdonly"
vttablet:
replicas: 1
replicas: 3
copySchema:
source: "customer/0"

Expand Down
Loading