Skip to content

Commit

Permalink
resolving merge conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Arindam Nayak <[email protected]>
  • Loading branch information
arindamnayak committed Dec 10, 2019
1 parent 8d20666 commit 0edbf69
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 8 deletions.
32 changes: 32 additions & 0 deletions docker/k8s/vtctlclient/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2019 The Vitess Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM vitess/k8s AS k8s

FROM debian:stretch-slim

RUN apt-get update && \
apt-get upgrade -qq && \
apt-get install jq -qq --no-install-recommends && \
apt-get autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY --from=k8s /vt/bin/vtctlclient /usr/bin/

# add vitess user/group and add permissions
RUN groupadd -r --gid 2000 vitess && \
useradd -r -g vitess --uid 1000 vitess

CMD ["/usr/bin/vtctlclient"]
19 changes: 19 additions & 0 deletions examples/helm/kvtctld.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Copyright 2019 The Vitess Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is a convenience script to run vtctlclient against the local example.

xdg-open "$(minikube service vtctld --url|head -n 1)"
34 changes: 34 additions & 0 deletions examples/kubernetes/etcd-down.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Copyright 2019 The Vitess Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is an example script that tears down the etcd servers started by
# etcd-up.sh.

set -e

script_root=`dirname "${BASH_SOURCE}"`
source $script_root/env.sh

replicas=${ETCD_REPLICAS:-3}
cells=`echo $CELLS | tr ',' ' '`

# Delete etcd clusters
for cell in 'global' $cells; do
echo "Stopping etcd cluster for $cell cell..."
sed -e "s/{{cell}}/$cell/g" -e "s/{{replicas}}/$replicas/g" \
etcd-service-template.yaml | \
$KUBECTL $KUBECTL_OPTIONS delete -f -
done
2 changes: 1 addition & 1 deletion go/vt/vttablet/tabletserver/tabletserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func NewTabletServer(config tabletenv.TabletConfig, topoServer *topo.Server, ali
// So that vtcombo doesn't even call it once, on the first tablet.
// And we can remove the tsOnce variable.
tsOnce.Do(func() {
srvTopoServer = srvtopo.NewResilientServer(topoServer, "TabletSrvTopo", true)
srvTopoServer = srvtopo.NewResilientServer(topoServer, "TabletSrvTopo")
stats.NewGaugeFunc("TabletState", "Tablet server state", func() int64 {
tsv.mu.Lock()
state := tsv.state
Expand Down
7 changes: 0 additions & 7 deletions go/vt/vttablet/tabletserver/vstreamer/planbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,6 @@ func mustSendStmt(query mysql.Query, dbname string) bool {
return true
}

func mustSendStmt(query mysql.Query, dbname string) bool {
if query.Database != "" && query.Database != dbname {
return false
}
return true
}

func mustSendDDL(query mysql.Query, dbname string, filter *binlogdatapb.Filter) bool {
if query.Database != "" && query.Database != dbname {
return false
Expand Down

0 comments on commit 0edbf69

Please sign in to comment.