Skip to content

Instantly share code, notes, and snippets.

View wallnerryan's full-sized avatar

Ryan Wallner wallnerryan

  • Boston, MA
  • 10:40 (UTC -05:00)
View GitHub Profile
packageportworximport("fmt""os"volumeclient"github.com/libopenstorage/openstorage/api/client/volume""k8s.io/klog""k8s.io/utils/mount"utilstrings"k8s.io/utils/strings"v1"k8s.io/api/core/v1""k8s.io/apimachinery/pkg/api/resource"metav1"k8s.io/apimachinery/pkg/apis/meta/v1""k8s.io/apimachinery/pkg/types""k8s.io/kubernetes/pkg/volume""k8s.io/kubernetes/pkg/volume/util")const(attachContextKey="context"attachHostKey="host")//ProbeVolumePluginsistheprimaryentrypointforvolumeplugins.funcProbeVolumePlugins()[]volume.VolumePlugin{return[]volume.VolumePlugin{&portworxVolumePlugin{nil,nil}}}typeportworxVolumePluginstruct{hostvolume.VolumeHostutil*portworxVolumeUtil}var_volume.VolumePlugin=&portworxVolumePlugin{}var_volume.PersistentVolumePlugin=&portworxVolumePlugin{}var_volume.DeletableVolumePlugin=&portworxVolumePlugin{}var_volume.ProvisionableVolumePlugin=&portworxVolumePlugin{}var_volume.ExpandableVolumePlugin=&portworxVolumePlugin{}const(portworxVolumePluginName="kubernetes.io/portworx-volume")funcgetPath(uidtypes.UI
@wallnerryan
wallnerryan / inventory2json.py
Created December 11, 2019 17:07 — forked from sivel/inventory2json.py
Ansible inventory to dynamic inventory JSON output, accepts all inventory input formats
import sys
import json
from ansible.parsing.dataloader import DataLoader
try:
from ansible.inventory.manager import InventoryManager
A24 = True
except ImportError:
from ansible.vars import VariableManager
[global]
donothing=true
[global]
direct=1
rw=write
size=10G
ioengine=libaio
iodepth=128
end_fsync=1
[write]
directory=/myvol
[global]
direct=1
rw=read
size=10G
ioengine=libaio
iodepth=128
end_fsync=1
[read]
directory=/myvol
[global]
direct=1
rw=write
size=10G
ioengine=libaio
iodepth=128
end_fsync=1
[seqwrite]
directory=/myvol
[global]
direct=1
rw=write
size=128M
numjobs=8
time_based
runtime=720
ioengine=libaio
iodepth=128
group_reporting=1
[global]
direct=1
rw=randrw
size=10g
numjobs=1
ioengine=libaio
iodepth=128
randrepeat=1
gtod_reduce=1
end_fsync=1
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: gp2
provisioner: kubernetes.io/aws-ebs
parameters:
type: gp2
reclaimPolicy: Delete
mountOptions:
- debug
[global]
direct=1
rw=write
size=10G
numjobs=8
ioengine=libaio
iodepth=128
group_reporting=1
[test-randwrite-1G]