Skip to content

Instantly share code, notes, and snippets.

View kaparora's full-sized avatar
🏠
Working from home

Kapil Arora kaparora

🏠
Working from home
View GitHub Profile
#!/bin/sh
#enable the transform secret engine for masking
vault secrets enable -path=/data-protection/masking/transform transform
#Define a role ccn with transformation ccn
vault write /data-protection/masking/transform/role/ccn transformations=ccn
#create a transformation of type masking using a template (defined in next step )
#and assign role ccn to it that we created earlier
#!/bin/sh
#enable the transform secret engine at a path of your choice
vault secrets enable -path=/data-protection/transform transform
#Define a role ssn with transformation name ssn
vault write /data-protection/transform/role/ssn transformations=ssn
#create a transformation of type fpe using built in template for social security number
#and assign role ssn to it that we created earlier
@kaparora
kaparora / vault-transform-fpe.sh
Last active April 19, 2020 10:15
These gists are created for the HashiCorp Vault ADP blog on medium
#!/bin/sh
#enable the transform secret engine at a path of your choice
vault secrets enable -path=/data-protection/transform transform
#Define a role ssn with transformation name ssn
vault write /data-protection/transform/role/ssn transformations=ssn
#create a transformation of type fpe using built in template for social security number
#and assign role ssn to it that we created earlier
@kaparora
kaparora / backend-trident-netapp-solidfire-iscsi.json
Created April 5, 2017 13:02
Sample NetApp SolidFire iSCSI Backend JSON file for Trident, the Kubernetes dynamic storage provisioner
{
"version": 1,
"storageDriverName": "solidfire-san",
"Endpoint": "https://username:secret-password01@sf-mvip.demo.netapp.com/json-rpc/7.0",
"SVIP": "192.168.0.100:3260",
"TenantName": "trident",
"InitiatorIFace": "default",
"Types": [{"Type": "Bronze", "Qos": {"minIOPS": 1000, "maxIOPS": 2000, "burstIOPS": 4000}},
{"Type": "Silver", "Qos": {"minIOPS": 4000, "maxIOPS": 6000, "burstIOPS": 8000}},
{"Type": "Gold", "Qos": {"minIOPS": 6000, "maxIOPS": 8000, "burstIOPS": 10000}}]
@kaparora
kaparora / backend-trident-netapp-solidfire-iscsi.json
Created April 5, 2017 12:53
Sample NetApp SolidFire iSCSI Backend JSON file for Trident, the Kubernetes dynamic storage provisioner
{
"version": 1,
"storageDriverName": "solidfire-iscsi",
"Endpoint": "https://username:secret-password01@sf-mvip.demo.netapp.com/json-rpc/7.0",
"SVIP": "192.168.0.100:3260",
"TenantName": "trident",
"InitiatorIFace": "default",
"Types": [{"Type": "Bronze", "Qos": {"minIOPS": 1000, "maxIOPS": 2000, "burstIOPS": 4000}},
{"Type": "Silver", "Qos": {"minIOPS": 4000, "maxIOPS": 6000, "burstIOPS": 8000}},
{"Type": "Gold", "Qos": {"minIOPS": 6000, "maxIOPS": 8000, "burstIOPS": 10000}}]
@kaparora
kaparora / wordpress-mysql-nfs-gold.yaml
Created March 27, 2017 14:26
Wordpress Mysql kubernetes/Openshift deployment with NFS Gold storage class Raw
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-disk
annotations:
volume.beta.kubernetes.io/storage-class: nfs-gold
spec:
accessModes:
- ReadWriteOnce
resources:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-disk
annotations:
volume.beta.kubernetes.io/storage-class: nfs-gold
trident.netapp.io/exportPolicy: "default"
spec:
accessModes:
- ReadWriteOnce
@kaparora
kaparora / wordpress-mysql-gold.yaml
Created March 27, 2017 13:35
Wordpress Mysql kubernetes/Openshift deployment with Gold storage class
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-disk
annotations:
volume.beta.kubernetes.io/storage-class: gold
spec:
accessModes:
- ReadWriteOnce
resources:
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: mongo
spec:
serviceName: "mongo"
replicas: 3
template:
metadata:
labels:
apiVersion: v1
kind: Pod
metadata:
name: mysql
labels:
name: mysql
spec:
containers:
- resources:
limits :