Skip to content

Instantly share code, notes, and snippets.

View ironcladlou's full-sized avatar

Dan Mace ironcladlou

View GitHub Profile
#!/usr/bin/env ruby
require 'json'
def name(obj)
"#{obj['metadata']['namespace']}/#{obj['metadata']['name']}"
end
def names(list)
list.map{|o| o["metadata"]["name"]}
curl -k -s -m 5 -o /dev/null -w %{http_code}\\n --header Host: serving-cert-e2e-test-router-reencrypt-lvhj2.apps.ci-op-f266r1zt-cbd67.ci.azure.devcluster.openshift.com https://52.189.69.175\n+ code=503\n+ [[ 0 -eq 0 ]]\n+ echo 503\n+ [[ 503 -eq 200 ]]\n+ [[ 503 -ne 503 ]]\n+ sleep 1\n+ date +%s\n+ [ 1571823938 -lt 1571824116 ]\n
curl -k -s -m 5 -o /dev/null -w %{http_code}\\n --header Host: serving-cert-e2e-test-router-reencrypt-lvhj2.apps.ci-op-f266r1zt-cbd67.ci.azure.devcluster.openshift.com https://52.189.69.175\n+ code=503\n+ [[ 0 -eq 0 ]]\n+ echo 503\n+ [[ 503 -eq 200 ]]\n+ [[ 503 -ne 503 ]]\n+ sleep 1\n+ date +%s\n+ [ 1571823939 -lt 1571824116 ]\n
curl -k -s -m 5 -o /dev/null -w %{http_code}\\n --header Host: serving-cert-e2e-test-router-reencrypt-lvhj2.apps.ci-op-f266r1zt-cbd67.ci.azure.devcluster.openshift.com https://52.189.69.175\n+ code=000\n+ rc=28\n+ [[ 28 -eq 0 ]]\n+ echo error 28\nerror 28\n+ sleep 1\n+ date +%s\n+ [ 1571823947 -lt 1571824116 ]\n
curl -k -s -m 5 -o /dev/null -w %{http_code}\\n
kind: Template
apiVersion: v1
metadata:
name: traffic-policy-demo
parameters:
- name: GATEWAY_NODE
required: true
- name: NON_GATEWAY_NODE
required: true
objects:
#!/bin/bash
set -euo pipefail
daemonset_json=$(cat <<EOF
{
"kind": "DaemonSet",
"apiVersion": "apps/v1",
"metadata": {
"name": "ditm",
"namespace": "default"
@ironcladlou
ironcladlou / clusterctl
Created October 8, 2019 15:00
clusterctl
#!/usr/bin/env bash
set -euo pipefail
function print_usage_exit() {
echo "usage: clusterctl <create|delete> <platform> <name>"
exit 1
}
WHAT="${1:-}"
PLATFORM="${2:-}"
@ironcladlou
ironcladlou / app.yaml
Created July 29, 2019 21:42
Private ingresscontroller demo
kind: Namespace
apiVersion: v1
metadata:
name: private-hello
---
kind: Deployment
apiVersion: apps/v1
metadata:
#/bin/bash
set -euo pipefail
WHAT="${1:-}"
PLATFORM="${2:=}"
NAME="${3:-}"
CLUSTER_DIR="$HOME/clusters/${PLATFORM}-${NAME}"
if [ -z "$NAME" ]; then
echo "usage: create-cluster <cluster|config> <platform> <name>"
package main
import (
"os"
"fmt"
"net/http"
"net/url"
)
/*
#!/bin/bash
set -euo pipefail
function show_login_help {
cat << EOF
Log in at https://api.ci.openshift.org/oauth/token/request and try again.
EOF
exit 1
}
pico-8 cartridge // http://www.pico-8.com
version 18
__lua__
-- global
debug={
enabled=true,
show={
data=false,
timers=true,