Skip to content

Commit

Permalink
chore: add some examples (pingcap#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
csuzhangxc authored Nov 20, 2024
1 parent 60071d2 commit 9b2291a
Show file tree
Hide file tree
Showing 13 changed files with 403 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/basic/01-pd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ spec:
path: /var/lib/pd
for:
- type: data
storage: 100Gi
storage: 20Gi
2 changes: 2 additions & 0 deletions examples/basic/03-tidb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ spec:
name: basic
version: v8.1.0
replicas: 2
service:
type: ClusterIP
template:
metadata:
annotations:
Expand Down
5 changes: 5 additions & 0 deletions examples/bootstrap-sql/00-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: core.pingcap.com/v1alpha1
kind: Cluster
metadata:
name: bsql
spec: {}
22 changes: 22 additions & 0 deletions examples/bootstrap-sql/01-pd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: core.pingcap.com/v1alpha1
kind: PDGroup
metadata:
name: pd
labels:
pingcap.com/group: pd
pingcap.com/component: pd
pingcap.com/cluster: bsql
spec:
cluster:
name: bsql
version: v8.1.0
replicas: 3
template:
spec:
config: ""
volumes:
- name: data
path: /var/lib/pd
for:
- type: data
storage: 20Gi
22 changes: 22 additions & 0 deletions examples/bootstrap-sql/02-tikv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: core.pingcap.com/v1alpha1
kind: TiKVGroup
metadata:
name: tikv
labels:
pingcap.com/group: tikv
pingcap.com/component: tikv
pingcap.com/cluster: bsql
spec:
cluster:
name: bsql
version: v8.1.0
replicas: 3
template:
spec:
config: ""
volumes:
- name: data
path: /var/lib/tikv
for:
- type: data
storage: 100Gi
17 changes: 17 additions & 0 deletions examples/bootstrap-sql/03-tidb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: core.pingcap.com/v1alpha1
kind: TiDBGroup
metadata:
name: tidb
labels:
pingcap.com/group: tidb
pingcap.com/component: tidb
pingcap.com/cluster: bsql
spec:
cluster:
name: bsql
version: v8.1.0
replicas: 1
bootstrapSQLConfigMapName: bsql
template:
spec:
config: ""
7 changes: 7 additions & 0 deletions examples/bootstrap-sql/bsql-cm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
data:
bootstrap-sql: |
SET PASSWORD FOR 'root'@'%' = 'pingcap';
kind: ConfigMap
metadata:
name: bsql
7 changes: 7 additions & 0 deletions examples/tls/00-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: core.pingcap.com/v1alpha1
kind: Cluster
metadata:
name: tls
spec:
tlsCluster:
enabled: true
24 changes: 24 additions & 0 deletions examples/tls/01-pd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: core.pingcap.com/v1alpha1
kind: PDGroup
metadata:
name: pd
labels:
pingcap.com/group: pd
pingcap.com/component: pd
pingcap.com/cluster: tls
spec:
cluster:
name: tls
version: v8.1.0
replicas: 3
template:
spec:
config: |
[security]
cert-allowed-cn = ["TiDB"]
volumes:
- name: data
path: /var/lib/pd
for:
- type: data
storage: 20Gi
24 changes: 24 additions & 0 deletions examples/tls/02-tikv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: core.pingcap.com/v1alpha1
kind: TiKVGroup
metadata:
name: tikv
labels:
pingcap.com/group: tikv
pingcap.com/component: tikv
pingcap.com/cluster: tls
spec:
cluster:
name: tls
version: v8.1.0
replicas: 3
template:
spec:
config: |
[security]
cert-allowed-cn = ["TiDB"]
volumes:
- name: data
path: /var/lib/tikv
for:
- type: data
storage: 100Gi
20 changes: 20 additions & 0 deletions examples/tls/03-tidb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: core.pingcap.com/v1alpha1
kind: TiDBGroup
metadata:
name: tidb
labels:
pingcap.com/group: tidb
pingcap.com/component: tidb
pingcap.com/cluster: tls
spec:
cluster:
name: tls
version: v8.1.0
replicas: 1
tlsClient:
enabled: true
template:
spec:
config: |
[security]
cluster-verify-cn = ["TiDB"]
27 changes: 27 additions & 0 deletions examples/tls/04-tiflash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: core.pingcap.com/v1alpha1
kind: TiFlashGroup
metadata:
name: tiflash
labels:
pingcap.com/group: tiflash
pingcap.com/component: tiflash
pingcap.com/cluster: tls
spec:
cluster:
name: tls
version: v8.1.0
replicas: 1
template:
spec:
config: |
[security]
cert_allowed_cn = ["TiDB"]
proxyConfig: |
[security]
cert-allowed-cn = ["TiDB"]
volumes:
- name: data
path: /data0
for:
- type: data
storage: 100Gi
Loading

0 comments on commit 9b2291a

Please sign in to comment.