-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dong Zhu <[email protected]>
- Loading branch information
Showing
115 changed files
with
21,618 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,27 @@ | ||
apiVersion: v2 | ||
appVersion: v5.3.0-rc13 | ||
dependencies: | ||
- name: zookeeper-operator | ||
repository: http://iomesh.com/charts | ||
version: 0.2.15 | ||
- name: hostpath-provisioner | ||
repository: http://iomesh.com/charts | ||
version: 0.5.3 | ||
- condition: openebs-ndm.enabled | ||
name: openebs-ndm | ||
repository: http://iomesh.com/charts | ||
version: 1.8.0 | ||
- name: csi-driver | ||
repository: http://iomesh.com/charts | ||
version: 2.6.0 | ||
- name: blockdevice-monitor | ||
repository: http://iomesh.com/charts | ||
version: 0.1.0 | ||
- condition: iomesh-localpv-manager.enabled | ||
name: iomesh-localpv-manager | ||
repository: http://iomesh.com/charts | ||
version: 0.1.0 | ||
description: Install all IOMesh components | ||
name: iomesh | ||
type: application | ||
version: v1.0.1 |
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,36 @@ | ||
# IOMesh Helm Chart | ||
|
||
## Introduction | ||
|
||
IOMesh is a Kubernetes-native storage system that manages storage resources within a Kubernetes cluster, automates operations and maintenance, and provides persistent storage, data protection and migration capabilities for data applications such as MySQL, Cassandra, MongoDB and middleware running on Kubernetes. | ||
|
||
**Homepage:** [https://docs.iomesh.com/introduction/introduction](https://docs.iomesh.com/introduction/introduction) | ||
|
||
## Prerequisites | ||
|
||
[https://docs.iomesh.com/deploy-iomesh-cluster/prerequisites](https://docs.iomesh.com/deploy-iomesh-cluster/prerequisites) | ||
|
||
## Installation | ||
|
||
[https://docs.iomesh.com/deploy-iomesh-cluster/install-iomesh](https://docs.iomesh.com/deploy-iomesh-cluster/install-iomesh) | ||
|
||
## Uninstallation | ||
|
||
Uninstall **IOMesh cluster** helm chart | ||
|
||
Specify the current release name and namespace to uninstall. | ||
|
||
```bash | ||
helm uninstall --namespace iomesh-system iomesh | ||
``` | ||
If there are IOMesh resources left after uninstalling IOMesh due to network or other issues, run the following command to clear all IOMesh resources. | ||
```bash | ||
curl -sSL https://iomesh.run/uninstall_iomesh.sh | sh - | ||
``` | ||
## Configuration | ||
|
||
[https://docs.iomesh.com/deploy-iomesh-cluster/setup-iomesh](https://docs.iomesh.com/deploy-iomesh-cluster/setup-iomesh) | ||
|
||
## Contact Us | ||
|
||
[https://www.iomesh.com/contact](https://www.iomesh.com/contact) |
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,6 @@ | ||
apiVersion: v2 | ||
appVersion: v0.1.0 | ||
description: A disk health component | ||
name: blockdevice-monitor | ||
type: application | ||
version: 0.1.0 |
185 changes: 185 additions & 0 deletions
185
src/stable/iomesh/charts/blockdevice-monitor/crds/iomesh.com_blockdevicemonitors.yaml
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,185 @@ | ||
|
||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.3.0 | ||
creationTimestamp: null | ||
name: blockdevicemonitors.iomesh.com | ||
spec: | ||
group: iomesh.com | ||
names: | ||
kind: BlockDeviceMonitor | ||
listKind: BlockDeviceMonitorList | ||
plural: blockdevicemonitors | ||
shortNames: | ||
- bdm | ||
singular: blockdevicemonitor | ||
scope: Namespaced | ||
versions: | ||
- additionalPrinterColumns: | ||
- description: Unique binding to BlockDevice | ||
jsonPath: .spec.bindedBlockDevice | ||
name: BLOCKDEVICENAME | ||
type: string | ||
- description: The name of node where the device is mounted | ||
jsonPath: .spec.nodeName | ||
name: NODENAME | ||
type: string | ||
- description: Device Path e.g. /dev/sda | ||
jsonPath: .spec.devicePath | ||
name: DEVICEPATH | ||
type: string | ||
- description: Driver Type, the value is among HDD, SSD, NVMe | ||
jsonPath: .spec.driverType | ||
name: DriverType | ||
type: string | ||
name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: BlockDeviceMonitor is the Schema for the blockdevicemonitors | ||
API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: BlockDeviceMonitorSpec defines the desired state of BlockDeviceMonitor | ||
properties: | ||
bindedBlockDevice: | ||
description: BindedBlockDevie unique binding to BlockDevice | ||
type: string | ||
devicePath: | ||
type: string | ||
driverType: | ||
type: string | ||
nodeName: | ||
type: string | ||
required: | ||
- bindedBlockDevice | ||
type: object | ||
status: | ||
description: BlockDeviceMonitorStatus defines the observed state of BlockDeviceMonitor | ||
properties: | ||
iostat: | ||
description: 'IOStat Determine slow disk according to iostat HDD slow | ||
disk: within the last 90s, within six consecutive 15s intervals: | ||
1. The average delay is greater than 3000ms 2. IOPS less than 50 | ||
3. Read and write speeds do not exceed 50MiB/s (102400 logical sectors | ||
per second) SSD slow disk: within the last 90s, six consecutive | ||
15s intervals: 1. Average latency greater than 500ms 2. IOPS less | ||
than 5000 3. Read and write speeds d0 not exceed 150MiB/s (307200 | ||
logical sectors per second)' | ||
properties: | ||
iops: | ||
description: IOPS average number of reads and writes per second | ||
format: int64 | ||
type: integer | ||
latencyMS: | ||
description: LatencyMS average disk read and write latency | ||
format: int64 | ||
type: integer | ||
slow: | ||
description: Slow disk, is true if latency > thresh. | ||
type: boolean | ||
totalBandwidth: | ||
description: TotalBandwidth read and write disk speed unit bytes | ||
per second. | ||
format: int64 | ||
type: integer | ||
required: | ||
- slow | ||
type: object | ||
lastUpdateDateTime: | ||
description: LastUpdateDateTime resource last updated time | ||
properties: | ||
nanos: | ||
description: Non-negative fractions of a second at nanosecond | ||
resolution. Negative second values with fractions must still | ||
have non-negative nanos values that count forward in time. Must | ||
be from 0 to 999,999,999 inclusive. This field may be limited | ||
in precision depending on context. | ||
format: int32 | ||
type: integer | ||
seconds: | ||
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. | ||
Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. | ||
format: int64 | ||
type: integer | ||
required: | ||
- nanos | ||
- seconds | ||
type: object | ||
smart: | ||
description: Smart Disk S.M.A.R.T information | ||
properties: | ||
lifespanPercentage: | ||
description: Lifespan disk life percentage | ||
format: int64 | ||
type: integer | ||
smartSelfTestStatus: | ||
type: string | ||
type: object | ||
zbsDeviceHealth: | ||
additionalProperties: | ||
description: ZBSDeviceHealthDetail Distributed block storage disk | ||
device health information. | ||
properties: | ||
errflags: | ||
description: Errflags Disk read and write failure | ||
format: int32 | ||
type: integer | ||
mountStatus: | ||
description: The Status is determined in Cache, Partition, and | ||
Journal according to the mount type | ||
type: string | ||
mountType: | ||
type: string | ||
numChecksumErrors: | ||
description: NumChecksumErrors counts of checksum errors | ||
format: int64 | ||
type: integer | ||
numIOErrors: | ||
description: NumIOErrors device io error counts. | ||
format: int64 | ||
type: integer | ||
numSlowIO: | ||
description: NumSlowIO device slow io counts | ||
format: int64 | ||
type: integer | ||
warnflags: | ||
description: Warnflags record disk warning status | ||
format: int32 | ||
type: integer | ||
required: | ||
- errflags | ||
- mountStatus | ||
- mountType | ||
- numChecksumErrors | ||
- numIOErrors | ||
- numSlowIO | ||
- warnflags | ||
type: object | ||
type: object | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: [] | ||
storedVersions: [] |
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,20 @@ | ||
- alert: Insufficient physical disk lifetime | ||
expr: ((blockdevicemonitor_smart_lifespan_percentage != -1) and (blockdevicemonitor_smart_lifespan_percentage < 20)) * on (hash) group_left (node, device_name, serial_number) blockdevicemonitor_blockdevice_info | ||
for: 1m | ||
labels: | ||
severity: Notice | ||
annotations: | ||
summary: "Node {{ $labels.node }}: The remaining lifetime of the physical disk {{ $labels.serial_number }}({{ $labels.device_name }}) is less than 20%." | ||
description: It is detected that the physical disk has an insufficient lifetime. | ||
impact: The risk of failure and performance degradation increases significantly as the physical disk reaches the end of its life. | ||
solution: Please replace the physical disk in time. | ||
- alert: Physical disk S.M.A.R.T failed | ||
expr: (blockdevicemonitor_smart_self_test_status == 2) * on(hash) group_left(node,device_name,serial_number) blockdevicemonitor_blockdevice_info | ||
for: 1m | ||
labels: | ||
severity: Critical | ||
annotations: | ||
summary: "Node {{ $labels.node }}: Physical disk {{ $labels.serial_number }}({{ $labels.device_name }}) S.M.A.R.T. check failed." | ||
description: The S.M.A.R.T. test of the physical disk is abnormal. | ||
impact: The risk of failure of the physical disk increases significantly. | ||
solution: Please replace the physical disk in time. |
Empty file.
46 changes: 46 additions & 0 deletions
46
src/stable/iomesh/charts/blockdevice-monitor/templates/blockdevicemonitor_deployment.yaml
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,46 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Release.Name }}-blockdevice-monitor | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: blockdevice-monitor | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: blockdevice-monitor | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: blockdevice-monitor | ||
spec: | ||
{{- with .Values.blockdevicemonitor.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.blockdevicemonitor.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.blockdevicemonitor.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: blockdevicemonitor | ||
command: | ||
- /blockdevicemonitor | ||
- --blockdevicemonitor-metrics-port={{ .Values.blockdevicemonitor.metrics.port }} | ||
image: {{ .Values.global.registry }}{{ .Values.blockdevicemonitor.image.repository }}:{{ .Values.blockdevicemonitor.image.tag | default .Chart.AppVersion }} | ||
imagePullPolicy: {{ .Values.blockdevicemonitor.image.pullPolicy }} | ||
resources: | ||
limits: | ||
memory: {{ .Values.blockdevicemonitor.resources.limits.memory }} | ||
env: | ||
- name: BLOCK_DEVICE_NAMESPACE | ||
value: {{ .Release.Namespace }} | ||
ports: | ||
- name: {{ .Values.blockdevicemonitor.metrics.portName }} | ||
containerPort: {{ .Values.blockdevicemonitor.metrics.port }} | ||
|
Oops, something went wrong.