Skip to content

Instantly share code, notes, and snippets.

View ilackarms's full-sized avatar

ilackarms

View GitHub Profile
{ "compressionlevel":-1,
"height":100,
"infinite":false,
"layers":[
{
"data":[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
## apply to client cluster
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: reviews.bookinfo.svc.remote-cluster.global
namespace: istio-system
spec:
addresses:
- 241.208.99.7
endpoints:
@ilackarms
ilackarms / petstore.yaml
Created May 26, 2020 19:14
Kuberntes Petstore v1 Manifest
##########################
# #
# Example #
# Service #
# #
# #
##########################
# petstore service
apiVersion: apps/v1
@ilackarms
ilackarms / swag.yaml
Created May 19, 2020 19:24
example swag
components:
schemas:
errorModel:
properties:
code:
format: int32
type: integer
message:
type: string
required:
# Source: gloo/templates/9-gateway-proxy-configmap.yaml
# config_map
apiVersion: v1
kind: ConfigMap
metadata:
name: gateway-proxy-envoy-config
namespace: gloo-system
labels:
app: gloo
gloo: gateway-proxy
@ilackarms
ilackarms / nomad-gloo-demo.sh
Last active September 8, 2019 21:22
simple script to set up gloo with consul, vault, nomad
#!/usr/bin/env bash
set -e
if ! type levant > /dev/null; then
echo installing levant...
wget https://github.com/jrasell/levant/releases/download/0.2.7/darwin-amd64-levant
chmod +x darwin-amd64-levant
sudo mv darwin-amd64-levant /usr/local/bin/levant
fi
@ilackarms
ilackarms / write-gloo-yaml-from-go.go
Created February 25, 2019 17:57
shows how to write kube-friendly yaml files for gloo using Go code
package main
import (
"github.com/ghodss/yaml"
gateway "github.com/solo-io/gloo/projects/gateway/pkg/api/v1"
"github.com/solo-io/gloo/projects/gloo/pkg/api/v1"
"github.com/solo-io/gloo/projects/gloo/pkg/api/v1/plugins/transformation"
"github.com/solo-io/solo-kit/pkg/api/v1/clients/kube/crd"
"github.com/solo-io/solo-kit/pkg/api/v1/resources"
"github.com/solo-io/solo-kit/pkg/api/v1/resources/core"
@ilackarms
ilackarms / helmwithouttiller.go
Created February 2, 2019 23:54
poc of helm without tiller or the helm cli. render charts in a go function
package helm
import (
"fmt"
"github.com/solo-io/go-utils/errors"
"k8s.io/helm/pkg/chartutil"
"k8s.io/helm/pkg/proto/hapi/chart"
"k8s.io/helm/pkg/renderutil"
"k8s.io/helm/pkg/timeconv"
)
#!/bin/bash
set -e
mkdir -p gloo-logs
kubectl logs -n gloo-system -l gloo=control-plane > gloo-logs/control-plane.log
kubectl logs -n gloo-system -l gloo=ingress > gloo-logs/ingress.log
glooctl upstream get -o yaml > gloo-logs/upstreams.yaml
glooctl virtualservice get -o yaml > gloo-logs/vservice.yaml
tar czf gloo-logs.tar.gz gloo-logs
rm -r gloo-logs
@ilackarms
ilackarms / install.hcl
Created April 18, 2018 01:37
need help with container-to-container networking
job "gloo" {
datacenters = [
"dc1"]
type = "service"
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "3m"