Skip to content

Commit

Permalink
add examples for gcp (pingcap#3193)
Browse files Browse the repository at this point in the history
* add examples for gcp

Co-authored-by: DanielZhangQD <[email protected]>
  • Loading branch information
cofyc and DanielZhangQD authored Sep 2, 2020
1 parent 662b037 commit ec0bc72
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 0 deletions.
81 changes: 81 additions & 0 deletions examples/gcp/tidb-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
apiVersion: pingcap.com/v1alpha1
kind: TidbCluster
metadata:
name: basic
spec:
version: v4.0.4
timezone: UTC
configUpdateStrategy: RollingUpdate
pvReclaimPolicy: Retain
schedulerName: tidb-scheduler
pd:
baseImage: pingcap/pd
replicas: 3
requests:
storage: "10Gi"
config:
log:
level: info
replication:
location-labels:
- zone
max-replicas: 3
nodeSelector:
dedicated: pd
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: pd
tikv:
baseImage: pingcap/tikv
replicas: 3
requests:
storage: "100Gi"
annotations:
tidb.pingcap.com/sysctl-init: "true"
podSecurityContext:
sysctls:
- name: net.core.somaxconn
value: "32768"
config: {}
nodeSelector:
dedicated: tikv
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: tikv
tidb:
baseImage: pingcap/tidb
replicas: 2
service:
annotations:
cloud.google.com/load-balancer-type: "Internal"
exposeStatus: true
externalTrafficPolicy: Local
type: LoadBalancer
config:
log:
level: info
performance:
max-procs: 0
tcp-keep-alive: true
annotations:
tidb.pingcap.com/sysctl-init: "true"
podSecurityContext:
sysctls:
- name: net.ipv4.tcp_keepalive_time
value: "300"
- name: net.ipv4.tcp_keepalive_intvl
value: "75"
- name: net.core.somaxconn
value: "32768"
separateSlowLog: true
nodeSelector:
dedicated: tidb
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: tidb
52 changes: 52 additions & 0 deletions examples/gcp/tidb-monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
apiVersion: pingcap.com/v1alpha1
kind: TidbMonitor
metadata:
name: basic
spec:
alertmanagerURL: ""
annotations: {}
clusters:
- name: basic
grafana:
baseImage: grafana/grafana
envs:
# Configure Grafana using environment variables except GF_PATHS_DATA, GF_SECURITY_ADMIN_USER and GF_SECURITY_ADMIN_PASSWORD
# Ref https://grafana.com/docs/installation/configuration/#using-environment-variables
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_NAME: "Main Org."
GF_AUTH_ANONYMOUS_ORG_ROLE: "Viewer"
# if grafana is running behind a reverse proxy with subpath http://foo.bar/grafana
# GF_SERVER_DOMAIN: foo.bar
# GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s/grafana/"
imagePullPolicy: IfNotPresent
logLevel: info
password: admin
service:
portName: http-grafana
type: LoadBalancer
username: admin
version: 6.1.6
imagePullPolicy: IfNotPresent
initializer:
baseImage: pingcap/tidb-monitor-initializer
imagePullPolicy: IfNotPresent
version: v4.0.4
kubePrometheusURL: ""
persistent: true
prometheus:
baseImage: prom/prometheus
imagePullPolicy: IfNotPresent
logLevel: info
reserveDays: 12
service:
portName: http-prometheus
type: NodePort
version: v2.18.1
reloader:
baseImage: pingcap/tidb-monitor-reloader
imagePullPolicy: IfNotPresent
service:
portName: tcp-reloader
type: NodePort
version: v1.0.1
storage: 100Gi

0 comments on commit ec0bc72

Please sign in to comment.