Skip to content

Instantly share code, notes, and snippets.

cat /jffs/scripts/ddns-start
###################
#!/bin/sh
inadyn --cache-dir "/tmp/mnt/diversion/inadyn" --once -f "/jffs/inadyn.conf" -e "/sbin/ddns_custom_updated 1" --continue-on-error "/sbin/ddns_custom_updated 1"
###################
cat /jffs/inadyn.conf
###################
provider duckdns.org {
username = <token>
@jfblaine
jfblaine / controller.yaml
Created June 2, 2020 14:55
OSP13 on KVM Configurations
heat_template_version: queens
description: >
Software Config to drive os-net-config to configure VLANs for the Controller role.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
StorageIpSubnet:
default: ''
apiVersion: v1
kind: Template
labels:
template: "openshift-routes-and-services"
metadata:
name: httpd-cert-tests
annotations:
description: "Demo of secret signing for certs, routes, and service types"
tags: "httpd"
objects:
apiVersion: v1
kind: Template
labels:
template: "httpd-cert-tests"
metadata:
name: httpd-cert-tests
annotations:
description: "Demo of secret signing for certs"
tags: "httpd"
objects:
@jfblaine
jfblaine / gist:fffa93da0bee38caf469b6cf6a11129c
Last active May 4, 2020 19:32
Example of using service signing certs and all http/https route types
apiVersion: v1
kind: Template
labels:
template: "httpd-cert-tests"
metadata:
name: envoy-test-template
annotations:
description: "Demo of secret signing for certs"
tags: "httpd"
objects:
@jfblaine
jfblaine / gist:007ab38c14b5a481e84e9cfb8e617a60
Last active May 14, 2020 12:48
Istio url rewrite example
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hello
version: v1
name: hello
namespace: istio-test
spec:
progressDeadlineSeconds: 600
@jfblaine
jfblaine / finalize.sh
Created February 27, 2020 09:23
Remove terminating namespace
#!/bin/bash
#pass project name argument while running this shell script
kubectl proxy &
echo "Deleting the namespace $1"
oc project $1
oc delete --all all,secret,pvc > /dev/null
oc get ns $1 -o json > tempfile
sed -i 's/"kubernetes"//g' tempfile
@jfblaine
jfblaine / gist:0e778d48ff128eb0e8c87e644cff6c44
Last active July 27, 2020 18:23
Envoy sidecar example to do url rewrite
# to test:
# curl http://envoy-test.apps.86cc.example.opentlc.com/config-server
# apache output:
# 127.0.0.1 - - [27/Feb/2020:01:33:48 +0000] "GET / HTTP/1.1" 403 3985 "-" "curl/7.29.0"
#
# curl http://envoy-test.apps.86cc.example.opentlc.com/config-server/foo
# 127.0.0.1 - - [27/Feb/2020:01:35:58 +0000] "GET /foo HTTP/1.1" 404 196 "-" "curl/7.29.0"
#
# curl http://envoy-test.apps.86cc.example.opentlc.com/config-server/foo/bar
# 127.0.0.1 - - [27/Feb/2020:01:36:35 +0000] "GET /foo/bar HTTP/1.1" 404 196 "-" "curl/7.29.0"
yum -y install bash-completion
https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest-4.2/openshift-client-linux-4.2.13.tar.gz
oc completion bash >> /etc/bash_completion.d/oc_completion
https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest-4.2/openshift-install-linux-4.2.13.tar.gz
openshift-install completion bash >> /etc/bash_completion.d/openshift-install_completion
defaults
mode http
log global
option httplog
option dontlognull
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m