Skip to content

Instantly share code, notes, and snippets.

View owainlewis's full-sized avatar

Owain Lewis owainlewis

View GitHub Profile
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: fluent-bit
namespace: logging
labels:
k8s-app: fluent-bit-logging
version: v1
kubernetes.io/cluster-service: "true"
spec:
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-problem-detector
spec:
selector:
matchLabels:
app: node-problem-detector
template:
metadata:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: block-volume-london
spec:
storageClassName: "oci"
selector:
matchLabels:
failure-domain.beta.kubernetes.io/zone: "UK-LONDON-1-AD-2"
accessModes:
@owainlewis
owainlewis / main.go
Created August 2, 2018 13:04
Legal deps stuff
cat Godeps/Godeps.json | jq '.Deps[] | "\(.ImportPath) \(.Rev)"'
apiVersion: v1
kind: Pod
metadata:
name: security-context-demo
spec:
volumes:
- name: sec-ctx-vol
emptyDir: {}
containers:
- name: sec-ctx-demo
Aquire::http:Proxy "http://www-proxy-lon.uk.oracle.com:80";
Aquire::https:Proxy "http://www-proxy-lon.uk.oracle.com:80";
@owainlewis
owainlewis / create.sh
Created July 27, 2018 11:03
OCI Clusters
oci ce cluster list --compartment-id ocid1.compartment.oc1..aaaaaaaatl6llzxwwv2d652lwv3lhphmozqav24vcvlcilpqqnscwcuo4xyq
oci ce node-pool create \
--compartment-id ocid1.compartment.oc1..aaaaaaaatl6llzxwwv2d652lwv3lhphmozqav24vcvlcilpqqnscwcuo4xyq \
--cluster-id ocid1.cluster.oc1.uk-london-1.aaaaaaaaafstkzbug42tonbsguygkyjumezdozbumi4wmzrvgcrtizbxgrrg \
--name default \
--kubernetes-version v1.10.3 \
--node-image-name Oracle-Linux-7.4 \
--node-shape VM.Standard2.4 \
--subnet-ids '["ocid1.subnet.oc1.uk-london-1.aaaaaaaa3x7otd6fk4kt5lmubnm3h4wbyn6wuhfrcrktkvkfgfqbdwhu2r7q", "ocid1.subnet.oc1.uk-london-1.aaaaaaaawqgyohbjujfmelcpnm7xu37tx44ztjiqf56icccocekf7clwj2p"]'
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: foo-provisioner
spec:
replicas: 1
template:
spec:
containers:
- name: foo-provisioner
@owainlewis
owainlewis / licenses.py
Last active June 27, 2018 10:51
Python GoDeps extractor
import json
from pprint import pprint
import urllib.request
REWRITE = {
'cloud.google.com/go': 'github.com/GoogleCloudPlatform/gcloud-golang',
'golang.org/x': 'github.com/golang',
'k8s.io': 'github.com/kubernetes',
'gopkg.in/yaml.v2': 'github.com/go-yaml/yaml',

Create a secret with the required OCI config

kubectl create secret generic external-dns-config --from-file=config.yaml