Skip to content

Instantly share code, notes, and snippets.

View ravisantoshgudimetla's full-sized avatar
🌞
LGTM

Ravi Gudimetla ravisantoshgudimetla

🌞
LGTM
View GitHub Profile
apiVersion: v1
kind: Service
metadata:
name: win-webserver
labels:
app: win-webserver
spec:
ports:
# the port that this service should serve on
- port: 80
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <infrastructureID>
name: <infrastructureID>-<role>-<zone>
namespace: openshift-machine-api
spec:
replicas: 1
selector:
{
"kind" : "Policy",
"apiVersion" : "v1",
"predicates" : [
{"name" : "PodFitsHostPorts"},
{"name" : "PodFitsResources"},
{"name" : "NoDiskConflict"},
{"name" : "NoVolumeZoneConflict"},
{"name" : "MatchNodeSelector"},
{"name" : "HostName"}
@ravisantoshgudimetla
ravisantoshgudimetla / unit.go
Created August 24, 2018 23:07
Unit test failure
func TestInsufficientCapacityNodeDaemonDoesNotLaunchPod(t *testing.T) {
utilfeature.DefaultFeatureGate.Set(fmt.Sprintf("%s=false", features.ScheduleDaemonSetPods))
for _, strategy := range updateStrategies() {
podSpec := resourcePodSpec("too-much-mem", "75M", "75m")
ds := newDaemonSet("foo")
ds.Spec.UpdateStrategy = *strategy
ds.Spec.Template.Spec = podSpec
manager, podControl, _, err := newTestController(ds)
if err != nil {
t.Fatalf("error creating DaemonSets controller: %v", err)
@ravisantoshgudimetla
ravisantoshgudimetla / scheduler.yaml
Last active July 26, 2018 13:58
scheduler pod manifest file as a static pod
apiVersion: v1
kind: Pod
metadata:
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
labels:
openshift.io/component: scheduler
openshift.io/control-plane: 'true'
name: master-scheduler
namespace: kube-system
@ravisantoshgudimetla
ravisantoshgudimetla / scheduler.yaml
Created July 23, 2018 16:53
Static pod description of kube-scheduler after broken from controller.
apiVersion: v1
kind: Pod
metadata:
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
labels:
openshift.io/component: scheduler
openshift.io/control-plane: 'true'
name: master-scheduler
namespace: kube-system

Keybase proof

I hereby claim:

  • I am ravisantoshgudimetla on github.
  • I am ravig (https://keybase.io/ravig) on keybase.
  • I have a public key ASDCcUZbYGLYWpZdzAytqPV7GHrSx7yN51QP9h6o39ZnDwo

To claim this, I am signing this object:

@ravisantoshgudimetla
ravisantoshgudimetla / KVStore_map.go
Last active December 12, 2017 05:01
KVStore with map
package KVStore
type Item struct {
Key string
Val int
}
type Store map[string]int
// Checks if the item exists in the store. If the key exists it returns the value else it returns -1.
package KVStore
import (
"fmt"
"strconv"
"testing"
)
var cacheSize = int(50000)
var store = make(Store, cacheSize)
@ravisantoshgudimetla
ravisantoshgudimetla / KVStore.go
Created December 12, 2017 02:53
KVStore with slices
package KVStore
type Item struct {
Key string
Val int
}
type Store []Item
// Checks if the item exists in the store. If the item exists it returns index or else returns -1.