GCP VM disk loss by label disrupts the state of GCP persistent disk volume filtered using a label by detaching it from its VM instance for a specific duration.
View fault usage
- Kubernetes > 1.16.
- Service account should have editor access (or owner access) to the GCP project.
- Target disk volume should not be a boot disk of any VM instance.
- Kubernetes secret that has the GCP service account credentials in the default namespace. Below is a sample secret file:
All the disk volumes that have the target label are attached to their respective instances.
|GCP_PROJECT_ID||The ID of the GCP project, of which the disk volumes are a part.||All the target disk volumes should belong to a single GCP project.|
|DISK_VOLUME_LABEL||Label of the target non-boot persistent disk volume.|| This value is provided as a |
|ZONES||The zone of the target disk volumes.||Only one zone is provided, which indicates that all target disks reside in the same zone.|
|TOTAL_CHAOS_DURATION||Duration that you specify, through which chaos is injected into the target resource (in seconds).||Defaults to 30s.|
|CHAOS_INTERVAL||Time interval between two successive chaos iterations (in seconds).||Defaults to 30s.|
|DISK_AFFECTED_PERC||Percentage of total disks that are filtered using the target label (specify numeric values only.||Defaults to 0 (that corresponds to 1 disk).|
|SEQUENCE||Sequence of chaos execution for multiple target disks.||Defaults to parallel. It supports serial sequence as well.|
|RAMP_TIME||Period to wait before and after injecting chaos (in seconds).||For example, 30s.|
Common fault tunables
Refer to the common attributes to tune the common tunables for all the faults.
Detach volumes by label
It contains the label of disk volumes that are subject to disk loss. It detaches all the disks with the
DISK_VOLUME_LABEL label in the
ZONES zone within the
GCP_PROJECT_ID project. It re-attaches the disk volume after waiting for the duration specified by
TOTAL_CHAOS_DURATION environment variable.
DISK_VOLUME_LABEL accepts only one label and
ZONES accepts only one zone name. Therefore, all the disks must reside in the same zone.
Use the following example to tune it:
- name: gcp-vm-disk-loss-by-label
- name: DISK_VOLUME_LABEL
- name: ZONES
- name: GCP_PROJECT_ID
- name: TOTAL_CHAOS_DURATION