Skip to content

Instantly share code, notes, and snippets.

View tcdowney's full-sized avatar

Tim Downey tcdowney

View GitHub Profile
@tcdowney
tcdowney / cf-for-k8s-tls-matrix.md
Last active December 8, 2020 20:26
cf4k8s TLS matrix
Source\Destination External Apps System Components
External
@tcdowney
tcdowney / cf-virtualservice-example.yaml
Created March 20, 2020 16:00
cf-for-k8s istio virtualservice example
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
annotations:
cloudfoundry.org/fqdn: whoami.tim-2020-03-18.routing.lol
metacontroller.k8s.io/last-applied-configuration: '{"apiVersion":"networking.istio.io/v1alpha3","kind":"VirtualService","metadata":{"annotations":{"cloudfoundry.org/fqdn":"whoami.tim-2020-03-18.routing.lol"},"creationTimestamp":null,"labels":{"cloudfoundry.org/route-bulk-sync":"true"},"name":"vs-f48b53b677be4b3ddd70beba027fb405fb0a45be6da7ff17bb7e3afdc1942cf3"},"spec":{"gateways":["istio-ingress"],"hosts":["whoami.tim-2020-03-18.routing.lol"],"http":[{"route":[{"destination":{"host":"s-e7017323-678b-454b-b099-9e196b33bb02"},"headers":{"request":{"set":{"CF-App-Id":"46f34772-4c8f-4a09-b18e-75505681265c","CF-App-Process-Type":"web","CF-Organization-Id":"631fec7d-47cc-4e82-8df1-add1c314d94f","CF-Space-Id":"a71aaf82-4f4a-4967-a0a6-471c44484186"}},"response":{}}}]}]}}'
creationTimestamp: "2020-03-18T22:35:21Z"
generation: 1
labels:
cloudfoundry.org/route-
@tcdowney
tcdowney / convert-loadbalancer-to-nodeport.yaml
Created June 13, 2020 19:28
Convert LoadBalancer Service to NodePort ytt
#! https://downey.io/notes/dev/convert-loadbalancer-service-to-nodeport-ytt/
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind": "Service", "spec":{"type":"LoadBalancer"}}),expects=1
---
spec:
#@overlay/replace
type: NodePort
@tcdowney
tcdowney / ubuntu-sleep.yaml
Created June 27, 2020 00:54
Ubuntu Sleep Pod
apiVersion: v1
kind: Pod
metadata:
name: ubuntu
labels:
app: ubuntu
spec:
containers:
- image: ubuntu
command:
@tcdowney
tcdowney / ubuntu-sleep-network-policy.yaml
Created August 31, 2020 22:49
Ubuntu Sleep Pod Allow All NetworkPolicy
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: ubuntu-allow-all
spec:
policyTypes:
- Egress
- Ingress
podSelector:
matchLabels: