Skip to content

Commit

Permalink
Merge branch 'fix-drainer-bug' of https://github.com/weekface/tidb-op…
Browse files Browse the repository at this point in the history
…erator into fix-drainer-bug
  • Loading branch information
weekface committed Jul 6, 2020
2 parents 616bd2c + f555be5 commit 3d59b78
Show file tree
Hide file tree
Showing 13 changed files with 129 additions and 751 deletions.
2 changes: 1 addition & 1 deletion charts/tidb-drainer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ storage: 10Gi
# disbale detect causality
disableDetect: false
# if drainer donesn't have checkpoint, use initial commitTS to initial checkpoint
initialCommitTs: "0"
initialCommitTs: "-1"

# Whether enable the TLS connection between TiDB server components
tlsCluster:
Expand Down
32 changes: 16 additions & 16 deletions docs/api-references/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3314,22 +3314,6 @@ Set this value longer than the expected cleanup time for your process.
Defaults to 30 seconds.</p>
</td>
</tr>
<tr>
<td>
<code>lifecycle</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#lifecycle-v1-core">
Kubernetes core/v1.Lifecycle
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Lifecycle describes actions that the management system should take in response to container lifecycle
events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
until the action is complete, unless the container process fails, in which case the handler is aborted.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="configmapref">ConfigMapRef</h3>
Expand Down Expand Up @@ -10293,6 +10277,22 @@ TiDBConfig
<p>Config is the Configuration of tidb-servers</p>
</td>
</tr>
<tr>
<td>
<code>lifecycle</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.13/#lifecycle-v1-core">
Kubernetes core/v1.Lifecycle
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Lifecycle describes actions that the management system should take in response to container lifecycle
events. For the PostStart and PreStop lifecycle handlers, management of the container blocks
until the action is complete, unless the container process fails, in which case the handler is aborted.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="tidbstatus">TiDBStatus</h3>
Expand Down
6 changes: 4 additions & 2 deletions examples/advanced/tidb-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,10 @@ spec:
# Whether enable PVC reclaim for orphan PVC left by statefulset scale-in
enablePVReclaim: false

# Persistent volume reclaim policy applied to the PVs that consumed by TiDB cluster
pvReclaimPolicy: Recycle
## Persistent volume reclaim policy applied to the PVs that consumed by the TiDB cluster, default is Retain.
## Note that the reclaim policy Recycle may not be supported by some storage types, .e.g. local.
## Ref: https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/
pvReclaimPolicy: Retain

# ** TLS related Configuration **
# Whether enable the TLS connection between TiDB server components
Expand Down
5 changes: 4 additions & 1 deletion examples/basic-cn/tidb-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ spec:
# storageClassName: local-storage
requests:
storage: "1Gi"
config: {}
config:
storage:
# In basic examples, we set this to avoid using too much storage.
reserve-space: "0MB"
tidb:
baseImage: registry.cn-beijing.aliyuncs.com/tidb/tidb
replicas: 1
Expand Down
5 changes: 4 additions & 1 deletion examples/basic/tidb-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ spec:
# storageClassName: local-storage
requests:
storage: "1Gi"
config: {}
config:
storage:
# In basic examples, we set this to avoid using too much storage.
reserve-space: "0MB"
tidb:
baseImage: pingcap/tidb
replicas: 1
Expand Down
2 changes: 2 additions & 0 deletions hack/local-up-operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ fi
echo "info: loading images into cluster"
images=(
$DOCKER_REGISTRY/pingcap/tidb-operator:${IMAGE_TAG}
$DOCKER_REGISTRY/pingcap/tidb-backup-manager:${IMAGE_TAG}
)
for n in ${images[@]}; do
echo "info: loading image $n"
Expand All @@ -176,6 +177,7 @@ helm_args=(
--name tidb-operator-dev
--namespace "$NAMESPACE"
--set-string operatorImage=$DOCKER_REGISTRY/pingcap/tidb-operator:${IMAGE_TAG}
--set-string tidbBackupManagerImage=$DOCKER_REGISTRY/pingcap/tidb-backup-manager:${IMAGE_TAG}
--set-string controllerManager.logLevel=4
--set-string scheduler.logLevel=4
)
Expand Down
4 changes: 2 additions & 2 deletions images/tidb-backup-manager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM pingcap/tidb-enterprise-tools:latest
ARG VERSION=v1.51.0
ARG SHUSH_VERSION=v1.4.0
ARG TOOLKIT_VERSION=v3.0.15
ARG TOOLKIT_VERSION=v4.0.2
ARG TOOLKIT_V31=v3.1.2
ARG TOOLKIT_V40=v4.0.1
ARG TOOLKIT_V40=v4.0.2
RUN apk update && apk add ca-certificates

RUN wget -nv https://github.com/ncw/rclone/releases/download/${VERSION}/rclone-${VERSION}-linux-amd64.zip \
Expand Down
Loading

0 comments on commit 3d59b78

Please sign in to comment.