Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Utkarsh Mani Tripathi utkarshmani1997

🎯
Focusing
Block or report user

Report or block utkarshmani1997

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View NFS-Clusterroler.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: openebs-nfs-provisioner-runner
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
View PSP-NFS.yaml
kind: PodSecurityPolicy
metadata:
name: openebs-nfs-provisioner
spec:
fsGroup:
rule: RunAsAny
allowedCapabilities:
- DAC_READ_SEARCH
- SYS_RESOURCE
runAsUser:
View mayactl.txt
Portal Details :
- - - - - - - -
IQN : iqn.2016–09.com.openebs.jiva:pvc-5b0c7dc4-df68–11e9-b597–005056bda303
Volume : pvc-5b0c7dc4-df68–11e9-b597–005056bda303
Portal : 10.120.10.10:3260
Size : 150Gi
Controller Status : running,running
Controller Node : node-1
Replica Count : 3
Replica Details :
@utkarshmani1997
utkarshmani1997 / map.go
Created Jun 1, 2019
Idiomatic vs non-idiomatic
View map.go
package main
import "fmt"
type myMap map[string]string
func (m myMap) contains(key string) (val string, ok bool) {
val, ok = m[key]
return val, ok
}
@utkarshmani1997
utkarshmani1997 / vm-resize-hard-disk.md
Created Nov 13, 2018 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.
View vm-resize-hard-disk.md

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

View battery_monitor.py
#!/usr/bin/env python
from gi.repository import Notify
import subprocess
from time import sleep, time
from sys import argv
import dbus
def send_notification(title, text):
try:
View openebs-provisioner.go
// logic with decorator
// logging functions are exported from github.com/opentracing/opentracing-go/log
func Objdecorator(f func(key string, obj interface{}) log.Field) func(string, interface{}) log.Field {
return func(key string, obj interface{}) log.Field {
return log.Object(key, obj)
}
}
func Strdecorator(f func(key, val string) log.Field) func(string, string) log.Field {
return func(key, value string) log.Field {
View maya-exporter.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: maya-agent
spec:
replicas: 1
template:
metadata:
labels:
name: maya-agent
View service.yaml
apiVersion: v1
kind: Service
metadata:
name: goserver-service
spec:
selector:
app: goserver
type: NodePort
ports:
- port: 80
View hello.yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: server-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: goserver
You can’t perform that action at this time.