Created
March 23, 2023 16:30
-
-
Save emchristiansen/548280fea755ab397382687d70ea6406 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: pingcap.com/v1alpha1 | |
kind: TidbCluster | |
metadata: | |
name: basic | |
namespace: tidb-cluster | |
spec: | |
version: v6.5.0 | |
timezone: UTC | |
# pvReclaimPolicy: Retain | |
pvReclaimPolicy: Delete | |
enableDynamicConfiguration: true | |
configUpdateStrategy: RollingUpdate | |
topologySpreadConstraints: | |
- topologyKey: topology.kubernetes.io/zone | |
discovery: {} | |
helper: | |
image: alpine:3.16.0 | |
pd: | |
baseImage: pingcap/pd | |
maxFailoverCount: 0 | |
replicas: 3 | |
requests: | |
storage: "3Gi" | |
storageClassName: openebs-hostpath | |
config: | |
replication: | |
location-labels: ["topology.kubernetes.io/zone"] | |
max-replicas: 3 | |
isolation-level: "topology.kubernetes.io/zone" | |
tikv: | |
baseImage: pingcap/tikv | |
maxFailoverCount: 0 | |
evictLeaderTimeout: 1m | |
replicas: 3 | |
requests: | |
storage: "10Gi" | |
storageClassName: openebs-hostpath | |
config: | |
server: | |
labels: | |
zone: topology.kubernetes.io/zone | |
storage: | |
reserve-space: "128MB" | |
block-cache: | |
capacity: "1GB" | |
tidb: | |
baseImage: pingcap/tidb | |
maxFailoverCount: 0 | |
replicas: 3 | |
service: | |
type: ClusterIP | |
config: | |
server: | |
labels: | |
zone: topology.kubernetes.io/zone | |
tidb: | |
grpc-compression-type: gzip | |
initContainers: | |
- name: add-node-label | |
image: bitnami/kubectl:1.21.6 | |
command: | |
- sh | |
- -c | |
- | | |
set -e | |
POD_NAME=$(cat /etc/hostname) | |
kubectl label pods $POD_NAME nodeName=${NODE_NAME} --overwrite -n ${NAMESPACE} | |
securityContext: | |
runAsUser: 0 | |
env: | |
- name: KUBECONFIG | |
value: /root/.kube/config | |
- name: NAMESPACE | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace | |
- name: NODE_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: spec.nodeName | |
volumeMounts: | |
- name: kubeconfig | |
mountPath: /root/.kube/config | |
readOnly: true | |
subPath: config | |
additionalVolumes: | |
- name: kubeconfig | |
secret: | |
secretName: kubeconfig | |
items: | |
- key: config | |
path: config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment