Skip to content

Instantly share code, notes, and snippets.

@glyn
glyn / gen-manifest.yaml
Created February 11, 2020 15:02
sheaf gen-manifest output for riff
This file has been truncated, but you can view the full file.
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: certificaterequests.cert-manager.io
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
type: string
- JSONPath: .spec.issuerRef.name
@glyn
glyn / terminal.out
Created February 12, 2020 09:06
kpack scanning example
$ GO111MODULE=off go run github.com/projectriff/k8s-manifest-scanner/cmd/k8s-manifest-scanner scan https://raw.githubusercontent.com/pivotal/kpack/master/samples/experimental/store.yaml
[
"cloudfoundry/cnb:bionic",
"gcr.io/cf-build-service-public/node-engine-buildpackage@sha256:95ff756f0ef0e026440a8523f4bab02fd8b45dc1a8a3a7ba063cefdba5cb9493",
"gcr.io/cf-build-service-public/npm-buildpackage@sha256:5058ceb9a562ec647ea5a41008b0d11e32a56e13e8c9ec20c4db63d220373e33"
]
@glyn
glyn / kpack-extract.yaml
Created February 12, 2020 11:57
k8s-manifest-scanner failure to detect all images in https://storage.googleapis.com/projectriff/release/0.5.0/kpack.yaml
...
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kpack-controller
namespace: kpack
spec:
replicas: 1
selector:
@glyn
glyn / cert-manager.yaml
Last active February 13, 2020 15:06
Missed images
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: certificaterequests.cert-manager.io
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
type: string
- JSONPath: .spec.issuerRef.name
@glyn
glyn / console.txt
Created February 25, 2020 10:30
duck typed find and replace using gojq
cat scratch/deployment.yaml | ./gojq --yaml-input --yaml-output '(..|.spec?.containers|values[].image| select(. == "nginx"))|="banana"'
apiVersion: apps/v1
kind: Deployment
metadata:
name: sample-deployment
spec:
template:
spec:
containers:
- image: banana
@glyn
glyn / terminal.txt
Created March 10, 2020 14:51
How to get chrome to provide checkbox to allow external protocol dialog to be accepted by default
defaults write com.google.Chrome ExternalProtocolDialogShowAlwaysOpenCheckbox -bool true
@glyn
glyn / terminal.out
Created July 17, 2020 14:28
sheaf bundle contents
$ ./sheaf init --bundle-path scratch/example --bundle-name example
$ ./sheaf manifest add --bundle-path scratch/example -f scratch/deployment.yaml
Adding manifest from scratch/deployment.yaml
$ cat scratch/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: sample-deployment
spec:
template:
@glyn
glyn / lyarfgg.md
Created September 30, 2020 15:46
Learn You a Rust for Great Good!
@glyn
glyn / union with duplication from array
Last active November 19, 2020 16:12
JSONPath comparisons for unions with duplication
echo '["a"]' | ./src/wrap_in_docker.sh ./src/one_off.sh '$[0,0]'
Sending build context to Docker daemon 75.26kB
Step 1/24 : FROM ubuntu:20.10
...
Step 24/24 : RUN apt-get install -y --no-install-recommends ruby
---> Using cache
---> 25adaf4f6bcb
Successfully built 25adaf4f6bcb
Successfully tagged json-path-comparison:latest
[1/4] (cd implementations/Bash_JSONPath.sh && npm install) && echo > implementations/Bash_JSONPath.sh/build/node_modules_installed
@glyn
glyn / Live Streaming at CCWinch.md
Last active September 24, 2021 04:25
Live Streaming at CCWinch

Superseded by a book.