Skip to content

Instantly share code, notes, and snippets.

View viglesiasce's full-sized avatar

Vic Iglesias viglesiasce

View GitHub Profile
@viglesiasce
viglesiasce / rbac-example.sh
Last active January 10, 2022 09:10
RBAC Example for Developer per Namespace
export DEV_EMAIL=developer@example.com
export DEV_USERNAME=developer
export ADMIN_EMAIL=admin@example.com
export ADMIN_USERNAME=admin
# Grant the admin the ability to create new roles+bindings
kubectl create clusterrolebinding --clusterrole=cluster-admin --user=$ADMIN_EMAIL admin-$ADMIN_USERNAME
# Create RBAC resources to on
cat > dev-rbac.yaml <<EOF
- name: Create disks(s) and instance(s)
hosts: localhost
gather_facts: no
connection: local
vars:
state: active
machine_type: n1-highmem-4 # default
hosts:
- gluster-1a
- gluster-2a
steps:
- name: 'gcr.io/cloud-builders/docker'
id: build
args: ['build', '-t', 'gcr.io/vic-goog/sample-app:latest', '.']
- name: 'gcr.io/vic-goog/sample-app:latest'
id: test
args: ['go', 'test']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['container', 'clusters', 'get-credentials', 'junkyard', '--zone', 'us-west1-a']
env:
--- a/linkerd/tracer/zipkin/src/main/scala/io/buoyant/linkerd/tracer/ZipkinTracerInitializer.scala
+++ b/linkerd/tracer/zipkin/src/main/scala/io/buoyant/linkerd/tracer/ZipkinTracerInitializer.scala
@@ -1,5 +1,6 @@
package io.buoyant.linkerd.tracer
+import zipkin.finagle.http.HttpZipkinTracer
import com.fasterxml.jackson.annotation.JsonIgnore
import com.twitter.conversions.time._
import com.twitter.finagle._
@@ -29,35 +30,10 @@ case class ZipkinConfig(
--- [62/9599]
apiVersion: v1
kind: ConfigMap
metadata:
name: l5d-config
data:
config.yaml: |-
admin:
port: 9990
telemetry:
@viglesiasce
viglesiasce / spinnaker-local.yml
Last active November 16, 2017 02:08
Spinnaker local configuration
# This file is intended to override the default configuration in the
# spinnaker.yml file while providing guidance on the mostly likely
# configuration parameters to be changed.
#
# In order for Spinnaker to discover it, it must be copied to a file named
# "spinnaker-local.yml" and placed in the $HOME/.spinnaker directory.
global:
spinnaker:
timezone: 'America/Los_Angeles'
@viglesiasce
viglesiasce / runSpinnakerScript.xml
Last active August 18, 2016 05:13
Jenkins job definition for running a script
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<jenkins.model.BuildDiscarderProperty>
<strategy class="hudson.tasks.LogRotator">
<daysToKeep>10</daysToKeep>
<numToKeep>500</numToKeep>
@viglesiasce
viglesiasce / 1.md
Last active August 1, 2016 22:33
Gluster Install
  1. Run the install-gluster.sh script on all hosts
  2. The scripts assume you have named your hosts gluster-1 gluster-2 and gluster-3
  3. On one of the hosts, run the configure-gluster.sh script, make sure to use the proper subnet in the allow command. This subnet is where your hosts will be allowed to connect from
@viglesiasce
viglesiasce / index.html
Created May 5, 2016 03:03 — forked from devgru/.block
Heatmap of git commits
<html>
<body>
<style>
svg {
width: 100%;
height: 240px;
}
g text {
#!/usr/bin/python
"""Creates, writes, and reads a labeled custom metric.
This is an example of how to use the Google Cloud Monitoring API to create,
write, and read a labeled custom metric.
The metric has two labels: color and size, and the data points represent
the number of shirts of the given color and size in inventory.
Prerequisites: Run this Python example on a Google Compute Engine virtual
machine instance that has been set up using these intructions: