Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
kuberneting

Hector Fernandez hectorj2f

💭
kuberneting
View GitHub Profile
View Live coding interview D2iQ
Given two people calendars, find the blocks of time when both can attend to a meeting.
Drew's spare blocks of time: [[10:00, 11:30], [12:30, 14:30], [14:30, 15:00]]
Drew begins his day at 10:00 and leaves at 18:30, ([10:00, 18:30]).
Julian's spare blocks of time: [[09:00, 10:30], [12:00, 13:00], [16:00, 18:00]]
Julian begins his day at 09:00 and leaves at 20:00, ([09:00, 20:00]).
Expected Result:
* Slot: 10:00 -- 10:30
View density-test-error
E1017 14:18:26.198091 57527 clusterloader.go:177] Test Finished
E1017 14:18:26.198096 57527 clusterloader.go:178] Test: /Users/hector/myRepo/mesos_repo/gopath/src/github.com/mesosphere/konvoy-mwt/mwt-perf-tests/density/config.yaml
E1017 14:18:26.198103 57527 clusterloader.go:179] Status: Fail
E1017 14:18:26.198108 57527 clusterloader.go:181] Errors: [measurement call APIResponsiveness - APIResponsiveness error: top latency metric: there should be no high-latency requests, but: [got: {Resource:pods Subresource: Verb:LIST Scope:cluster Latency:{Perc50:186.177ms Perc90:519.097ms Perc99:23.293676s} Count:705}; expected perc99 <= 1s got: {Resource:ipamblocks Subresource: Verb:LIST Scope:cluster Latency:{Perc50:64.781ms Perc90:6.074028s Perc99:21.777461s} Count:269}; expected perc99 <= 1s got: {Resource:blockaffinities Subresource: Verb:LIST Scope:cluster Latency:{Perc50:943.254ms Perc90:5.511028s Perc99:20.536341s} Count:2817}; expected perc99 <= 1s got: {Resource:ipamhandles Subresource: Verb:DELETE
View gist:7ed4ed8e930ed547d7d15489b1493afa
apiVersion: v1
kind: ServiceAccount
metadata:
name: fluentd-logging
namespace: kube-system
labels:
k8s-app: fluentd-logging
kubernetes.io/cluster-service: "true"
---
kind: ClusterRole
View gist:6c7d21c92238d239e5165d522fff7337
#!/bin/bash
# DIR stores the path to the directory where this script is located
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# ETCD stores the command used to run etcd
ETCD="/usr/local/bin/etcd"
# ETCDCTL stores the command used to run etcdctl
ETCDCTL="/usr/local/bin/etcdctl"
# we use this to choose the path to the etcd/etcdctl binaries, but etcd cannot
View centos_script.sh
#!/bin/bash
echo "Role ${ROLE}"
sudo mv dcos-metrics-prometheus-plugin_1.10.5 /opt/mesosphere/bin/dcos-metrics-prometheus-plugin
echo "PROMETHEUS_PORT=61091" > dcos-metrics-prometheus.env
mv dcos-metrics-prometheus.env /opt/mesosphere/etc/
View hdfs-site.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hadoop.hdfs.configuration.version</name>
<value>1</value>
</property>
<property>
<name>dfs.nameservice.id</name>
<value>hdfs</value>
View kubernetes service logs
Archive: /var/lib/mesos/slave/slaves/66df60ae-ce98-4ce6-968a-f99922382ef3-S0/frameworks/66df60ae-ce98-4ce6-968a-f99922382ef3-0001/executors/kubernetes.eb803f00-daac-11e7-af0a-f66634909198/runs/6f3605e0-9e27-4133-a2af-bbbe3706877b/kubernetes-scheduler.zip
creating: /var/lib/mesos/slave/slaves/66df60ae-ce98-4ce6-968a-f99922382ef3-S0/frameworks/66df60ae-ce98-4ce6-968a-f99922382ef3-0001/executors/kubernetes.eb803f00-daac-11e7-af0a-f66634909198/runs/6f3605e0-9e27-4133-a2af-bbbe3706877b/kubernetes-scheduler/
inflating: /var/lib/mesos/slave/slaves/66df60ae-ce98-4ce6-968a-f99922382ef3-S0/frameworks/66df60ae-ce98-4ce6-968a-f99922382ef3-0001/executors/kubernetes.eb803f00-daac-11e7-af0a-f66634909198/runs/6f3605e0-9e27-4133-a2af-bbbe3706877b/kubernetes-scheduler/dashboard.template.yaml
inflating: /var/lib/mesos/slave/slaves/66df60ae-ce98-4ce6-968a-f99922382ef3-S0/frameworks/66df60ae-ce98-4ce6-968a-f99922382ef3-0001/executors/kubernetes.eb803f00-daac-11e7-af0a-f66634909198/runs/6f3605e0-9e27-4133-a2af-bbbe370687
View fabric9.json
[ {
"id" : "master",
"realm" : "master",
"displayName" : "Keycloak",
"displayNameHtml" : "<div class=\"kc-logo-text\"><span>Keycloak</span></div>",
"notBefore" : 0,
"revokeRefreshToken" : false,
"accessTokenLifespan" : 60,
"accessTokenLifespanForImplicitFlow" : 900,
"ssoSessionIdleTimeout" : 1800,
View gist:0e2e163b941bcebda6ee9564149d0c58
---
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: Secret
metadata:
annotations:
maven.fabric8.io/source-url: jar:file:/home/hector/rh_repo/gopath/src/github.com/fabric8io/fabric8-platform/apps/keycloak/target/keycloak-3.0-SNAPSHOT.jar!/META-INF/fabric8/openshift.yml
labels:
View output cmd
$ ./bin/alm-cli list work-item-link-type -H localhost:8080 --pp
2017/02/24 13:02:53 [INFO] started id=AGzGsdJ+ GET=http://localhost:8080/api/workitemlinktypes
2017/02/24 13:02:53 [INFO] completed id=AGzGsdJ+ status=200 time=21.729558ms
{
"data": [
{
"attributes": {
"description": "One bug blocks a planner item.",
"forward_name": "blocks",
"name": "Bug blocker",