Skip to content

Commit 079c95f

Browse files
committed
chore(mysql-cluster): optimisation metrics
2 parents 12ef7d7 + bbd7fd2 commit 079c95f

9 files changed

Lines changed: 274 additions & 4 deletions

File tree

addons/redis/7.0/meta.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,18 @@ allow_parameters:
2727
- name: "master.service.type"
2828
required: false
2929
description: "master service type config for values.yaml"
30+
- name: "master.disableCommands"
31+
required: false
32+
description: "master disableCommands config for values.yaml"
3033
- name: "replica.service.type"
3134
required: false
3235
description: "replica service type config for values.yaml"
3336
- name: "sentinel.service.type"
3437
required: false
3538
description: "sentinel service type config for values.yaml"
39+
- name: "replica.disableCommands"
40+
required: false
41+
description: "replica.disableCommands config for values.yaml"
3642
- name: "sentinel.enabled"
3743
required: false
3844
description: "sentinel enabled config for values.yaml"
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
credential:
2+
{{- if not .Values.sentinel.enabled }}
3+
{{ if (eq .Values.master.service.type "LoadBalancer") }}
4+
- name: EXTERNAL_MASTER_HOST
5+
valueFrom:
6+
serviceRef:
7+
name: {{ printf "%s-master" (include "common.names.fullname" .) }}
8+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
9+
{{- end }}
10+
11+
- name: MASTER_DOMAIN
12+
value: {{ printf "%s-master" (include "common.names.fullname" .) }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
13+
14+
- name: MASTER_HOST
15+
valueFrom:
16+
serviceRef:
17+
name: {{ printf "%s-master" (include "common.names.fullname" .) }}
18+
jsonpath: '{ .spec.clusterIP }'
19+
20+
- name: MASTER_PORT
21+
valueFrom:
22+
serviceRef:
23+
name: {{ printf "%s-master" (include "common.names.fullname" .) }}
24+
jsonpath: '{ .spec.ports[?(@.name=="tcp-redis")].port }'
25+
26+
- name: REDIS_PORT
27+
valueFrom:
28+
serviceRef:
29+
name: {{ template "common.names.fullname" . }}
30+
jsonpath: '{ .spec.ports[?(@.name=="tcp-redis")].port }'
31+
{{- end }}
32+
33+
{{- if and (eq .Values.architecture "replication") (not .Values.sentinel.enabled) }}
34+
{{ if (eq .Values.replica.service.type "LoadBalancer") }}
35+
- name: EXTERNAL_REPLICAS_HOST
36+
valueFrom:
37+
serviceRef:
38+
name: {{ printf "%s-replicas" (include "common.names.fullname" .) }}
39+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
40+
{{- end }}
41+
42+
- name: REPLICAS_DOMAIN
43+
value: {{ printf "%s-replicas" (include "common.names.fullname" .) }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
44+
45+
- name: REPLICAS_HOST
46+
valueFrom:
47+
serviceRef:
48+
name: {{ printf "%s-replicas" (include "common.names.fullname" .) }}
49+
jsonpath: '{ .spec.clusterIP }'
50+
51+
- name: REPLICAS_PORT
52+
valueFrom:
53+
serviceRef:
54+
name: {{ printf "%s-replicas" (include "common.names.fullname" .) }}
55+
jsonpath: '{ .spec.ports[?(@.name=="tcp-redis")].port }'
56+
{{- end }}
57+
58+
{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled }}
59+
{{ if (eq .Values.sentinel.service.type "LoadBalancer") }}
60+
- name: EXTERNAL_HOST
61+
valueFrom:
62+
serviceRef:
63+
name: {{ template "common.names.fullname" . }}
64+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
65+
{{- end }}
66+
67+
- name: DOMAIN
68+
value: {{ template "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
69+
70+
- name: HOST
71+
valueFrom:
72+
serviceRef:
73+
name: {{ template "common.names.fullname" . }}
74+
jsonpath: '{ .spec.clusterIP }'
75+
76+
- name: SENTINEL_PORT
77+
valueFrom:
78+
serviceRef:
79+
name: {{ template "common.names.fullname" . }}
80+
jsonpath: '{ .spec.ports[?(@.name=="tcp-sentinel")].port }'
81+
82+
- name: MASTER_NAME
83+
value: {{ .Values.sentinel.masterSet }}
84+
85+
{{- if.Values.proxy.enabled }}
86+
- name: PROXY_PORT
87+
valueFrom:
88+
serviceRef:
89+
name: {{ template "common.names.fullname" . }}
90+
jsonpath: '{ .spec.ports[?(@.name=="tcp-proxy")].port }'
91+
{{- end }}
92+
{{- end }}
93+
94+
{{- if and .Values.auth.enabled (not .Values.auth.existingSecret) }}
95+
- name: REDIS_PASSWORD
96+
valueFrom:
97+
secretKeyRef:
98+
name: {{ template "common.names.fullname" . }}
99+
jsonpath: '{ .data.redis-password }'
100+
{{- end }}
101+
102+
{{- if and .Values.auth.enabled .Values.auth.sentinel (not .Values.auth.existingSecret) }}
103+
- name: REDIS_SENTINEL_PASSWORD
104+
valueFrom:
105+
secretKeyRef:
106+
name: {{ template "common.names.fullname" . }}
107+
jsonpath: '{ .data.redis-password }'
108+
{{- end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"type": "object",
4+
"properties": {
5+
"imagePullPolicy": {
6+
"type": "string",
7+
"enum": ["Always", "IfNotPresent", "Never"],
8+
"default": "IfNotPresent",
9+
"title": "Image pull policy"
10+
}
11+
}
12+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: "standard-131072"
2+
id: e5b7900e-2311-4650-a580-1943591622a1
3+
description: "Redis standard-131072 plan which limit resources memory size 128Gi."
4+
displayName: "standard-131072"
5+
bindable: true
6+
maximum_polling_duration: 1800
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
## @param fullnameOverride String to fully override common.names.fullname
2+
##
3+
fullnameOverride: hb-redis-standard-131072
4+
5+
## @section Redis™ master configuration parameters
6+
##
7+
8+
master:
9+
## Redis™ master resource requests and limits
10+
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
11+
## @param master.resources.limits The resources limits for the Redis™ master containers
12+
## @param master.resources.requests The requested resources for the Redis™ master containers
13+
##
14+
resources:
15+
limits:
16+
cpu: 4
17+
memory: 128Gi
18+
requests:
19+
cpu: 2
20+
memory: 64Gi
21+
## Persistence parameters
22+
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
23+
##
24+
persistence:
25+
## @param master.persistence.enabled Enable persistence on Redis™ master nodes using Persistent Volume Claims
26+
##
27+
enabled: true
28+
## @param master.persistence.path The path the volume will be mounted at on Redis™ master containers
29+
## NOTE: Useful when using different Redis™ images
30+
##
31+
path: /drycc/redis/data
32+
## @param master.persistence.storageClass Persistent Volume storage class
33+
## If defined, storageClassName: <storageClass>
34+
## If set to "-", storageClassName: "", which disables dynamic provisioning
35+
## If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner
36+
##
37+
storageClass: ""
38+
## @param master.persistence.accessModes Persistent Volume access modes
39+
##
40+
accessModes:
41+
- ReadWriteOnce
42+
## @param master.persistence.size Persistent Volume size
43+
##
44+
size: 256Gi
45+
46+
## @section Redis&trade; replicas configuration parameters
47+
##
48+
49+
replica:
50+
## @param replica.replicaCount Number of Redis&trade; replicas to deploy
51+
##
52+
replicaCount: 3
53+
54+
## Redis&trade; replicas resource requests and limits
55+
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
56+
## @param replica.resources.limits The resources limits for the Redis&trade; replicas containers
57+
## @param replica.resources.requests The requested resources for the Redis&trade; replicas containers
58+
##
59+
resources:
60+
limits:
61+
cpu: 4
62+
memory: 128Gi
63+
requests:
64+
cpu: 2
65+
memory: 64Gi
66+
## Persistence Parameters
67+
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
68+
##
69+
persistence:
70+
## @param replica.persistence.enabled Enable persistence on Redis&trade; replicas nodes using Persistent Volume Claims
71+
##
72+
enabled: true
73+
## @param replica.persistence.path The path the volume will be mounted at on Redis&trade; replicas containers
74+
## NOTE: Useful when using different Redis&trade; images
75+
##
76+
path: /drycc/redis/data
77+
## @param replica.persistence.storageClass Persistent Volume storage class
78+
## If defined, storageClassName: <storageClass>
79+
## If set to "-", storageClassName: "", which disables dynamic provisioning
80+
## If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner
81+
##
82+
storageClass: ""
83+
## @param replica.persistence.accessModes Persistent Volume access modes
84+
##
85+
accessModes:
86+
- ReadWriteOnce
87+
## @param replica.persistence.size Persistent Volume size
88+
##
89+
size: 256Gi
90+
91+
sentinel:
92+
## Persistence parameters
93+
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
94+
##
95+
persistence:
96+
## @param sentinel.persistence.enabled Enable persistence on Redis&trade; sentinel nodes using Persistent Volume Claims (Experimental)
97+
##
98+
enabled: true
99+
## @param sentinel.persistence.storageClass Persistent Volume storage class
100+
## If defined, storageClassName: <storageClass>
101+
## If set to "-", storageClassName: "", which disables dynamic provisioning
102+
## If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner
103+
##
104+
storageClass: ""
105+
## @param sentinel.persistence.accessModes Persistent Volume access modes
106+
##
107+
accessModes:
108+
- ReadWriteOnce
109+
## @param sentinel.persistence.size Persistent Volume size
110+
##
111+
size: 8Gi
112+
113+
## Redis&trade; Sentinel resource requests and limits
114+
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
115+
## @param sentinel.resources.limits The resources limits for the Redis&trade; Sentinel containers
116+
## @param sentinel.resources.requests The requested resources for the Redis&trade; Sentinel containers
117+
##
118+
resources:
119+
limits:
120+
cpu: 1
121+
memory: 1Gi
122+
requests:
123+
cpu: 500m
124+
memory: 512Mi
125+
126+
proxy:
127+
## Redis&trade; Sentinel resource requests and limits
128+
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
129+
## @param proxy.resources.limits The resources limits for the Redis&trade; Sentinel containers
130+
## @param proxy.resources.requests The requested resources for the Redis&trade; Sentinel containers
131+
##
132+
resources:
133+
limits:
134+
cpu: 1
135+
memory: 1Gi
136+
requests:
137+
cpu: 500m
138+
memory: 512Mi

addons/redis/7.0/plans/standard-16384/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ sentinel:
108108
- ReadWriteOnce
109109
## @param sentinel.persistence.size Persistent Volume size
110110
##
111-
size: 32Gi
111+
size: 8Gi
112112

113113
## Redis&trade; Sentinel resource requests and limits
114114
## ref: https://kubernetes.io/docs/user-guide/compute-resources/

addons/redis/7.0/plans/standard-32768/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ sentinel:
108108
- ReadWriteOnce
109109
## @param sentinel.persistence.size Persistent Volume size
110110
##
111-
size: 64Gi
111+
size: 8Gi
112112

113113
## Redis&trade; Sentinel resource requests and limits
114114
## ref: https://kubernetes.io/docs/user-guide/compute-resources/

addons/redis/7.0/plans/standard-65536/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ sentinel:
108108
- ReadWriteOnce
109109
## @param sentinel.persistence.size Persistent Volume size
110110
##
111-
size: 128Gi
111+
size: 8Gi
112112

113113
## Redis&trade; Sentinel resource requests and limits
114114
## ref: https://kubernetes.io/docs/user-guide/compute-resources/

addons/redis/7.0/plans/standard-8192/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ sentinel:
108108
- ReadWriteOnce
109109
## @param sentinel.persistence.size Persistent Volume size
110110
##
111-
size: 16Gi
111+
size: 8Gi
112112

113113
## Redis&trade; Sentinel resource requests and limits
114114
## ref: https://kubernetes.io/docs/user-guide/compute-resources/

0 commit comments

Comments
 (0)