Skip to content

Commit

Permalink
Merge branch 'kind-cluster' of https://github.com/xiaojingchen/tidb-o…
Browse files Browse the repository at this point in the history
…perator into kind-cluster
  • Loading branch information
xiaojingchen committed Aug 28, 2019
2 parents 69cbefa + 6707176 commit 2019445
Show file tree
Hide file tree
Showing 16 changed files with 272 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ done
-config=/etc/drainer/drainer.toml \
-disable-detect={{ .Values.binlog.drainer.disableDetect | default false }} \
-initial-commit-ts={{ .Values.binlog.drainer.initialCommitTs | default 0 }} \
-data-dir=/data \
-log-file=
1 change: 1 addition & 0 deletions charts/tidb-cluster/templates/scripts/_start_pump.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -euo pipefail
-L={{ .Values.binlog.pump.logLevel | default "info" }} \
-advertise-addr=`echo ${HOSTNAME}`.{{ template "cluster.name" . }}-pump:8250 \
-config=/etc/pump/pump.toml \
-data-dir=/data \
-log-file=

if [ $? == 0 ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ done
-config=/etc/drainer/drainer.toml \
-disable-detect={{ .Values.disableDetect | default false }} \
-initial-commit-ts={{ .Values.initialCommitTs | default 0 }} \
-data-dir=/data \
-log-file=""
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ require (
github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e // indirect
github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a // indirect
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/gophercloud/gophercloud v0.3.0 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/mux v1.6.2 // indirect
github.com/gorilla/websocket v1.2.0 // indirect
Expand Down
5 changes: 5 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
Expand Down Expand Up @@ -119,6 +120,8 @@ github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g=
github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/gophercloud/gophercloud v0.3.0 h1:6sjpKIpVwRIIwmcEGp+WwNovNsem+c+2vm6oxshRpL8=
github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk=
Expand Down Expand Up @@ -274,6 +277,7 @@ go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 h1:1wopBVtVdWnn03fZelqdXTqk7U7zPQCb+T4rbU9ZEoU=
Expand All @@ -299,6 +303,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313 h1:pczuHS43Cp2ktBEEmLwScxgjWsBSzdaQiKzUyf3DTTc=
Expand Down
13 changes: 9 additions & 4 deletions manifests/gke/local-ssd-provision/local-ssd-provision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ spec:
set -euo pipefail
set -x
# discard,nobarrier are required to optimize local SSD
# performance in GCP, see
# https://cloud.google.com/compute/docs/disks/performance#optimize_local_ssd
mnt_opts="defaults,nodelalloc,noatime,discard,nobarrier"
# use /var because it is writeable on COS
if ! findmnt -n -a -l | grep /mnt/disks/ssd ; then
if test -f /var/ssd_mounts ; then
Expand Down Expand Up @@ -128,9 +133,9 @@ spec:
mnt_dir="/mnt/disks/$uuid"
mkdir -p "$mnt_dir"
if ! grep "$uuid" /etc/fstab ; then
echo "UUID=$uuid $mnt_dir ext4 rw,relatime,discard,nobarrier,data=ordered" >> /etc/fstab
echo "UUID=$uuid $mnt_dir ext4 $mnt_opts" >> /etc/fstab
fi
mount -U "$uuid" -t ext4 --target "$mnt_dir" --options 'rw,relatime,discard,nobarrier,data=ordered'
mount -U "$uuid" -t ext4 --target "$mnt_dir" --options "$mnt_opts"
chmod a+w "$mnt_dir"
fi
done
Expand Down Expand Up @@ -173,9 +178,9 @@ spec:
mkdir -p "$mnt_dir"
if ! grep "$uuid" /etc/fstab ; then
echo "UUID=$uuid $mnt_dir ext4 rw,relatime,discard,nobarrier,data=ordered" >> /etc/fstab
echo "UUID=$uuid $mnt_dir ext4 $mnt_opts" >> /etc/fstab
fi
mount -U "$uuid" -t ext4 --target "$mnt_dir" --options 'rw,relatime,discard,nobarrier,data=ordered'
mount -U "$uuid" -t ext4 --target "$mnt_dir" --options "$mnt_opts"
chmod a+w "$mnt_dir"
containers:
- image: "quay.io/external_storage/local-volume-provisioner:v2.3.2"
Expand Down
8 changes: 7 additions & 1 deletion pkg/tkctl/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ package cmd

import (
"flag"
"github.com/pingcap/tidb-operator/pkg/tkctl/cmd/version"
"io"

"github.com/pingcap/tidb-operator/pkg/tkctl/cmd/completion"
Expand All @@ -26,9 +25,16 @@ import (
"github.com/pingcap/tidb-operator/pkg/tkctl/cmd/list"
"github.com/pingcap/tidb-operator/pkg/tkctl/cmd/upinfo"
"github.com/pingcap/tidb-operator/pkg/tkctl/cmd/use"
"github.com/pingcap/tidb-operator/pkg/tkctl/cmd/version"
"github.com/pingcap/tidb-operator/pkg/tkctl/config"

"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
// TODO: import azure auth plugin after updating to k8s 1.13+
_ "k8s.io/client-go/plugin/pkg/client/auth/exec"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
_ "k8s.io/client-go/plugin/pkg/client/auth/openstack"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
)

Expand Down
7 changes: 4 additions & 3 deletions pkg/tkctl/cmd/ctop/ctop.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ package ctop

import (
"fmt"
"strings"

"github.com/pingcap/tidb-operator/pkg/tkctl/config"
"github.com/pingcap/tidb-operator/pkg/tkctl/executor"
"github.com/pingcap/tidb-operator/pkg/tkctl/util"
Expand All @@ -26,16 +28,15 @@ import (
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"strings"
)

const (
ctopExample = `
# ctop the specified pod
tkc ctop POD_NAME
tkctl ctop POD_NAME
# ctop the specified node
tkc ctop node/NODE_NAME
tkctl ctop node/NODE_NAME
`
ctopUsage = "expected 'ctop POD_NAME' or 'ctop node/NODE_NAME' for the ctop command"
defaultImage = "quay.io/vektorlab/ctop:0.7.2"
Expand Down
9 changes: 5 additions & 4 deletions pkg/tkctl/cmd/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package debug

import (
"fmt"

"github.com/pingcap/tidb-operator/pkg/tkctl/config"
"github.com/pingcap/tidb-operator/pkg/tkctl/executor"
"github.com/pingcap/tidb-operator/pkg/tkctl/util"
Expand All @@ -31,16 +32,16 @@ import (
const (
debugExample = `
# debug a container in the running pod, the first container will be picked by default
tkc debug POD_NAME
tkctl debug POD_NAME
# specify namespace or container
tkc debug --namespace foo POD_NAME -c CONTAINER_NAME
tkctl debug --namespace foo POD_NAME -c CONTAINER_NAME
# override the default troubleshooting image
tkc debug POD_NAME --image aylei/debug-jvm
tkctl debug POD_NAME --image aylei/debug-jvm
# override entrypoint of debug container
tkc debug POD_NAME --image aylei/debug-jvm /bin/bash
tkctl debug POD_NAME --image aylei/debug-jvm /bin/bash
`
debugLongDesc = `
Expand Down
Loading

0 comments on commit 2019445

Please sign in to comment.