This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
creationTimestamp: null | |
labels: | |
app: my-deployment | |
name: my-deployment | |
spec: | |
replicas: 1 | |
selector: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./overlays/prod/kustomization.yaml | |
./overlays/staging/kustomization.yaml | |
./pasta | |
./base/deployment.yaml | |
./base/kustomization.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eyIuL292ZXJsYXlzL3Byb2Qva3VzdG9taXphdGlvbi55YW1sIjoibmFtZXNwYWNlOiBwcm9kXG5iYXNlczpcbiAgLSAuLi8uLi9iYXNlXG5jb25maWdNYXBHZW5lcmF0b3I6XG4gIC0gbmFtZTogbXktY29uZmlnXG4gICAgYmVoYXZpb3I6IHJlcGxhY2VcbiAgICBsaXRlcmFsczpcbiAgICAgIC0gTUlYX0VOVj1wcm9kXG4iLCIuL292ZXJsYXlzL3N0YWdpbmcva3VzdG9taXphdGlvbi55YW1sIjoibmFtZXNwYWNlOiBzdGFnaW5nXG5iYXNlczpcbiAgLSAuLi8uLi9iYXNlXG4iLCIuL3Bhc3RhIjoiIyEgL3Vzci9iaW4vZW52IHJ1YnlcblxucmVxdWlyZSAnb3B0cGFyc2UnXG5yZXF1aXJlICdqc29uJ1xucmVxdWlyZSBcImJhc2U2NFwiXG5yZXF1aXJlICdmaWxldXRpbHMnXG5cbiRvdXQgPSBcIi90bXAvbG9sXCJcbm9wdGlvbnMgPSB7fVxuT3B0aW9uUGFyc2VyLm5ldyBkbyB8b3B0c3xcbiAgb3B0cy5iYW5uZXIgPSBcIlVzYWdlOiBwYXN0YS5yYiBbb3B0aW9uc11cIlxuXG4gIG9wdHMub24oXCItdlwiLCBcIi0tW25vLV12ZXJib3NlXCIsIFwiUnVuIHZlcmJvc2VseVwiKSBkbyB8dnxcbiAgICBvcHRpb25zWzp2ZXJib3NlXSA9IHZcbiAgZW5kXG5cbiAgb3B0cy5vbihcIi1wU1RSXCIsIFwiLS1wYXN0ZT1TVFJcIiwgXCJTdHJpbmcgdG8gcGFzdGVcIikgZG8gfHB8XG4gICAgb3B0aW9uc1s6cGFzdGVdID0gcFxuICBlbmRcblxuICBvcHRzLm9uKFwiLWNQQVRIXCIsIFwiLS1jb3B5PVBBVEhcIiwgXCJQYXRoIHRvIGNvcHlcIikgZG8gfGN8XG4gICAg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'optparse' | |
require 'json' | |
require "base64" | |
require 'fileutils' | |
$out = "/tmp/lol" | |
options = {} | |
OptionParser.new do |opts| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: CustomResourceDefinition | |
apiVersion: apiextensions.k8s.io/v1beta1 | |
metadata: | |
name: todos.todoapp.bonny.run | |
spec: | |
group: todoapp.bonny.run | |
names: | |
kind: Todo | |
plural: todos | |
shortNames: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bindings for a specific SA | |
kubectl get clusterrolebindings,rolebinding -o json | jq -r ' | |
.items[] | | |
select( | |
.subjects // [] | .[] | | |
[.kind,.namespace,.name] == ["ServiceAccount","default","default"] | |
) | | |
.metadata.name' | |
# Summary of rolebindings, clusterrolebindings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run shell in cluster w/ kubectl exec -it shell -- /bin/bash | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: shell | |
spec: | |
containers: | |
- name: shell | |
#image: busybox | |
#image: byrnedo/alpine-curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule K8s.Mock do | |
@moduledoc """ | |
A single interface to use for an environment, but allow each process to define its own module that implements behaviors to respond. | |
Good for tests, two tests can independently register the HTTP responses they should receive w/o having the confusing shared http_provider mock currently in k8s | |
""" | |
use GenServer | |
# TODO methods that the http behavior has go here, when executing should look up | |
# the registered module for the calling pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: nginx | |
labels: | |
name: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thinking about moving controller functionality from Bonny to K8s. | |
# Currently k8s is very focused around HTTP, but controllers are a common concept, so YMMV. | |
# This may be a piece of yarn, and end up pulling too much operator functionality. | |
# In that case, I'm using this for spit balling the API for Bonny v1. | |
# Start a new controller w/ default | |
K8s.Controller.start("foo.example.com/v1", :bars, mod: BarController) | |
K8s.Controller.start("foo.example.com/v1", :bars, | |
mod: BarController, |