-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create tidb cluster on ack with cr (#2012)
* create tidb cluster on ack with cr * update variable name * update variable name * update default replicas
- Loading branch information
1 parent
f66627c
commit df048e2
Showing
7 changed files
with
226 additions
and
13 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
apiVersion: pingcap.com/v1alpha1 | ||
kind: TidbMonitor | ||
metadata: | ||
name: TIDB_CLUSTER_NAME | ||
spec: | ||
alertmanagerURL: "" | ||
annotations: {} | ||
clusters: | ||
- name: TIDB_CLUSTER_NAME | ||
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 | ||
resources: {} | ||
# limits: | ||
# cpu: 8000m | ||
# memory: 8Gi | ||
# requests: | ||
# cpu: 4000m | ||
# memory: 4Gi | ||
service: | ||
portName: http-grafana | ||
type: LoadBalancer | ||
annotations: | ||
service.beta.kubernetes.io/alicloud-loadbalancer-address-type: internet | ||
username: admin | ||
version: 6.0.1 | ||
imagePullPolicy: IfNotPresent | ||
initializer: | ||
baseImage: pingcap/tidb-monitor-initializer | ||
imagePullPolicy: IfNotPresent | ||
resources: {} | ||
# limits: | ||
# cpu: 50m | ||
# memory: 64Mi | ||
# requests: | ||
# cpu: 50m | ||
# memory: 64Mi | ||
version: v3.0.12 | ||
kubePrometheusURL: "" | ||
nodeSelector: {} | ||
persistent: true | ||
prometheus: | ||
baseImage: prom/prometheus | ||
imagePullPolicy: IfNotPresent | ||
logLevel: info | ||
reserveDays: 12 | ||
resources: {} | ||
# limits: | ||
# cpu: 8000m | ||
# memory: 8Gi | ||
# requests: | ||
# cpu: 4000m | ||
# memory: 4Gi | ||
service: | ||
portName: http-prometheus | ||
type: NodePort | ||
version: v2.11.1 | ||
reloader: | ||
baseImage: pingcap/tidb-monitor-reloader | ||
imagePullPolicy: IfNotPresent | ||
resources: {} | ||
# limits: | ||
# cpu: 50m | ||
# memory: 64Mi | ||
# requests: | ||
# cpu: 50m | ||
# memory: 64Mi | ||
service: | ||
portName: tcp-reloader | ||
type: NodePort | ||
version: v1.0.1 | ||
storage: 100Gi | ||
storageClassName: alicloud-disk-available | ||
tolerations: [] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
apiVersion: pingcap.com/v1alpha1 | ||
kind: TidbCluster | ||
metadata: | ||
name: TIDB_CLUSTER_NAME | ||
spec: | ||
configUpdateStrategy: RollingUpdate | ||
enableTLSCluster: false | ||
helper: | ||
image: busybox:1.31.1 | ||
hostNetwork: false | ||
imagePullPolicy: IfNotPresent | ||
pd: | ||
affinity: {} | ||
baseImage: pingcap/pd | ||
config: | ||
log: | ||
level: info | ||
nodeSelector: | ||
dedicated: TIDB_CLUSTER_NAME-pd | ||
podSecurityContext: {} | ||
replicas: 3 | ||
requests: | ||
cpu: "1" | ||
memory: 400Mi | ||
storage: 20Gi | ||
storageClassName: alicloud-disk | ||
tolerations: | ||
- effect: NoSchedule | ||
key: dedicated | ||
operator: Equal | ||
value: TIDB_CLUSTER_NAME-pd | ||
pvReclaimPolicy: Retain | ||
schedulerName: tidb-scheduler | ||
tidb: | ||
affinity: {} | ||
annotations: | ||
tidb.pingcap.com/sysctl-init: "true" | ||
baseImage: pingcap/tidb | ||
config: | ||
log: | ||
level: info | ||
performance: | ||
max-procs: 0 | ||
tcp-keep-alive: true | ||
enableTLSClient: false | ||
maxFailoverCount: 3 | ||
nodeSelector: | ||
dedicated: TIDB_CLUSTER_NAME-tidb | ||
podSecurityContext: | ||
sysctls: | ||
- name: net.ipv4.tcp_keepalive_time | ||
value: "300" | ||
- name: net.ipv4.tcp_keepalive_intvl | ||
value: "75" | ||
- name: net.core.somaxconn | ||
value: "32768" | ||
replicas: 2 | ||
requests: | ||
cpu: "1" | ||
memory: 400Mi | ||
separateSlowLog: true | ||
service: | ||
annotations: | ||
service.beta.kubernetes.io/alicloud-loadbalancer-address-type: intranet | ||
service.beta.kubernetes.io/alicloud-loadbalancer-slb-network-type: vpc | ||
exposeStatus: true | ||
externalTrafficPolicy: Local | ||
type: LoadBalancer | ||
slowLogTailer: | ||
limits: | ||
cpu: 100m | ||
memory: 50Mi | ||
requests: | ||
cpu: 20m | ||
memory: 5Mi | ||
tolerations: | ||
- effect: NoSchedule | ||
key: dedicated | ||
operator: Equal | ||
value: TIDB_CLUSTER_NAME-tidb | ||
tikv: | ||
affinity: {} | ||
annotations: | ||
tidb.pingcap.com/sysctl-init: "true" | ||
baseImage: pingcap/tikv | ||
config: | ||
log-level: info | ||
hostNetwork: false | ||
maxFailoverCount: 3 | ||
nodeSelector: | ||
dedicated: TIDB_CLUSTER_NAME-tikv | ||
podSecurityContext: | ||
sysctls: | ||
- name: net.core.somaxconn | ||
value: "32768" | ||
privileged: false | ||
replicas: 3 | ||
requests: | ||
cpu: "1" | ||
memory: 2Gi | ||
storage: 100Gi | ||
storageClassName: local-volume | ||
tolerations: | ||
- effect: NoSchedule | ||
key: dedicated | ||
operator: Equal | ||
value: TIDB_CLUSTER_NAME-tikv | ||
timezone: UTC | ||
version: v3.0.12 | ||
|
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
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
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
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