Skip to content

Commit

Permalink
Merge pull request #33 from chengyu-l/k8s_v1.12.0
Browse files Browse the repository at this point in the history
enhancement: add PriorityClass for ChubaoFS core service
  • Loading branch information
awzhgw authored Sep 11, 2020
2 parents a062f7a + fdc860d commit d9af79d
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 117 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# chubaofs-helm Makefile

all: build
package: lint
cp README.md chubaofs/ && helm package chubaofs && rm chubaofs/README.md

lint:
helm lint ./chubaofs

build: lint
helm package ./chubaofs

.PHONY: all lint build
.PHONY: package
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ provisioner:
You should tag each Kubernetes node with the appropriate labels accorindly for server node and CSI node of ChubaoFS.

```
kubectl label node <nodename> chuabaofs-master=enabled
kubectl label node <nodename> chuabaofs-metanode=enabled
kubectl label node <nodename> chuabaofs-datanode=enabled
kubectl label node <nodename> chubaofs-master=enabled
kubectl label node <nodename> chubaofs-metanode=enabled
kubectl label node <nodename> chubaofs-datanode=enabled
kubectl label node <nodename> chubaofs-csi-node=enabled
```
Expand Down
6 changes: 3 additions & 3 deletions chubaofs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: v1
name: chubaofs
description: A Helm chart for ChubaoFS
home: https://chubao.io
# kubeVersion: ">=1.12.0"
version: 2.0.0
appVersion: 2.0.0
kubeVersion: ">=1.12.0"
version: 2.2.1
appVersion: 2.2.1.030.0
keywords:
- chubaofs
- chubaofs-helm
Expand Down
67 changes: 0 additions & 67 deletions chubaofs/README.md

This file was deleted.

44 changes: 22 additions & 22 deletions chubaofs/config/grafana/provisioning/dashboards/chubaofs.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"gnetId": null,
"graphTooltip": 0,
"id": 1,
"iteration": 1593328519495,
"iteration": 1596694182271,
"links": [],
"panels": [
{
Expand Down Expand Up @@ -105,7 +105,7 @@
"valueMaps": [
{
"op": "=",
"text": "N/A",
"text": "0",
"value": "null"
}
],
Expand Down Expand Up @@ -183,7 +183,7 @@
"valueMaps": [
{
"op": "=",
"text": "N/A",
"text": "0",
"value": "null"
}
],
Expand Down Expand Up @@ -260,7 +260,7 @@
"valueMaps": [
{
"op": "=",
"text": "N/A",
"text": "0",
"value": "null"
}
],
Expand Down Expand Up @@ -337,7 +337,7 @@
"valueMaps": [
{
"op": "=",
"text": "N/A",
"text": "0",
"value": "null"
}
],
Expand Down Expand Up @@ -414,7 +414,7 @@
"valueMaps": [
{
"op": "=",
"text": "N/A",
"text": "0",
"value": "null"
}
],
Expand Down Expand Up @@ -479,7 +479,7 @@
"tableColumn": "",
"targets": [
{
"expr": "sum(cfs_master_vol_count{cluster=~\"$cluster\", instance=\"$master_instance\"})",
"expr": "avg(cfs_master_vol_count{app=\"$app\", cluster=\"$cluster\"})",
"format": "time_series",
"intervalFactor": 1,
"refId": "A"
Expand All @@ -492,7 +492,7 @@
"valueMaps": [
{
"op": "=",
"text": "N/A",
"text": "0",
"value": "null"
}
],
Expand Down Expand Up @@ -1131,7 +1131,7 @@
"pluginVersion": "6.4.4",
"targets": [
{
"expr": "topk($topk, cfs_master_vol_used_GB{app=\"$app\",cluster=\"$cluster\", instance=\"$master_instance\"}/cfs_master_vol_total_GB{app=\"$app\",cluster=\"$cluster\", instance=\"$master_instance\"})",
"expr": "topk($topk, cfs_master_vol_usage_ratio{app=\"$app\",cluster=\"$cluster\",instance=\"$master_instance\"})",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
Expand Down Expand Up @@ -1177,7 +1177,7 @@
"current": false,
"max": false,
"min": false,
"show": true,
"show": false,
"total": false,
"values": false
},
Expand Down Expand Up @@ -1217,7 +1217,7 @@
"title": "VolumeUsedSize",
"tooltip": {
"shared": true,
"sort": 0,
"sort": 2,
"value_type": "individual"
},
"type": "graph",
Expand Down Expand Up @@ -1266,7 +1266,7 @@
"current": false,
"max": false,
"min": false,
"show": true,
"show": false,
"total": false,
"values": false
},
Expand All @@ -1292,7 +1292,7 @@
"steppedLine": false,
"targets": [
{
"expr": "topk($topk, cfs_master_vol_used_GB{app=\"$app\",cluster=\"$cluster\", instance=\"$master_instance\"}/cfs_master_vol_total_GB{app=\"$app\",cluster=\"$cluster\", instance=\"$master_instance\"})",
"expr": "topk($topk, cfs_master_vol_usage_ratio{app=\"$app\",cluster=\"$cluster\",instance=\"$master_instance\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{volName}}",
Expand Down Expand Up @@ -1355,7 +1355,7 @@
"current": false,
"max": false,
"min": false,
"show": true,
"show": false,
"total": false,
"values": false
},
Expand Down Expand Up @@ -1475,7 +1475,7 @@
"refId": "C"
},
{
"expr": "cfs_master_vol_used_GB{app=\"$app\",cluster=\"$cluster\", volName=\"$vol\", instance=\"$master_instance\"}/cfs_master_vol_total_GB{app=\"$app\",cluster=\"$cluster\", volName=\"$vol\", instance=\"$master_instance\"}",
"expr": "cfs_master_vol_usage_ratio{app=\"$app\",cluster=\"$cluster\", volName=\"$vol\", instance=\"$master_instance\"}",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "UsedRatio",
Expand Down Expand Up @@ -4995,7 +4995,7 @@
"name": "vol",
"options": [],
"query": "label_values(cfs_master_vol_total_GB{app=\"$app\",cluster=\"$cluster\"}, volName)",
"refresh": 1,
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
Expand All @@ -5008,8 +5008,8 @@
{
"allValue": null,
"current": {
"text": "192.168.0.11:17010",
"value": "192.168.0.11:17010"
"text": "192.168.0.13:17010",
"value": "192.168.0.13:17010"
},
"datasource": "Prometheus",
"definition": "label_values(up{app=\"$app\", role=\"$role\", cluster=\"$cluster\"}, instance)",
Expand All @@ -5033,8 +5033,8 @@
{
"allValue": null,
"current": {
"text": "192.168.0.11",
"value": "192.168.0.11"
"text": "192.168.0.13",
"value": "192.168.0.13"
},
"datasource": "Prometheus",
"definition": "label_values(go_info{instance=\"$instance\", cluster=\"$cluster\"}, instance)",
Expand All @@ -5058,8 +5058,8 @@
{
"allValue": null,
"current": {
"text": "192.168.0.11:17010",
"value": "192.168.0.11:17010"
"text": "192.168.0.13:17010",
"value": "192.168.0.13:17010"
},
"datasource": "Prometheus",
"definition": "label_values(up{app=\"$app\", role=\"master\", cluster=\"$cluster\"}, instance)",
Expand Down
1 change: 1 addition & 0 deletions chubaofs/templates/csi-controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ spec:
app: cfs-csi-controller
spec:
serviceAccount: cfs-csi-service-account
priorityClassName: chubaofs-high-priority
# nodeSelector:
# chubaofs-csi-controller: enabled
containers:
Expand Down
1 change: 1 addition & 0 deletions chubaofs/templates/csi-node-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
app: cfs-csi-node
spec:
serviceAccount: cfs-csi-service-account
priorityClassName: chubaofs-high-priority
nodeSelector:
chubaofs-csi-node: enabled
containers:
Expand Down
1 change: 0 additions & 1 deletion chubaofs/templates/csi-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{{- $envAll := . }}
{{- $namespace := .Values.namespace }}
---
---
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down
3 changes: 3 additions & 0 deletions chubaofs/templates/daemonset-datanode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ metadata:
{{ tuple $envAll $namespace "datanode" | include "helm-toolkit.metadata_labels" | indent 4 }}
namespace: {{ $namespace }}
spec:
updateStrategy:
type: OnDelete
selector:
matchLabels:
{{ tuple $envAll $namespace "datanode" | include "helm-toolkit.metadata_labels" | indent 6 }}
Expand All @@ -21,6 +23,7 @@ spec:
nodeSelector:
{{ $.Values.datanode.labels.node_selector_key }}: {{ $.Values.datanode.labels.node_selector_value }}
hostNetwork: true
priorityClassName: chubaofs-high-priority
hostPID: true
dnsPolicy: ClusterFirstWithHostNet
initContainers:
Expand Down
3 changes: 3 additions & 0 deletions chubaofs/templates/daemonset-metanode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ metadata:
{{ tuple $envAll $namespace "metanode" | include "helm-toolkit.metadata_labels" | indent 4 }}
namespace: {{ $namespace }}
spec:
updateStrategy:
type: OnDelete
selector:
matchLabels:
{{ tuple $envAll $namespace "metanode" | include "helm-toolkit.metadata_labels" | indent 6 }}
Expand All @@ -21,6 +23,7 @@ spec:
nodeSelector:
{{ $.Values.metanode.labels.node_selector_key }}: {{ $.Values.metanode.labels.node_selector_value }}
hostNetwork: true
priorityClassName: chubaofs-high-priority
hostPID: true
dnsPolicy: ClusterFirstWithHostNet
initContainers:
Expand Down
7 changes: 7 additions & 0 deletions chubaofs/templates/priorityclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: chubaofs-high-priority
value: 1000000
globalDefault: false
description: "This priority class should be used for ChubaoFS core service pods only."
3 changes: 3 additions & 0 deletions chubaofs/templates/statefulset-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ metadata:
{{ tuple $envAll $namespace "master" | include "helm-toolkit.metadata_labels" | indent 4 }}
namespace: {{ $namespace }}
spec:
updateStrategy:
type: OnDelete
replicas: {{ .Values.master.replicas }}
serviceName: master-service
selector:
Expand All @@ -23,6 +25,7 @@ spec:
nodeSelector:
{{ $.Values.master.labels.node_selector_key }}: {{ $.Values.master.labels.node_selector_value }}
hostNetwork: true
priorityClassName: chubaofs-high-priority
hostPID: true
dnsPolicy: ClusterFirstWithHostNet
initContainers:
Expand Down
2 changes: 0 additions & 2 deletions chubaofs/templates/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ parameters:
masterAddr: {{ include "chubaofs.master-service.with.port" . | quote }}
# Consul Service IP address or URL
consulAddr: {{ $consulAddress | quote }}
# Owner name as authentication
owner: {{ $.Values.provisioner.owner }}
# Log level:debug, info, warn, error
logLevel: {{ $.Values.provisioner.log_level }}
---
Expand Down
Loading

0 comments on commit d9af79d

Please sign in to comment.