Skip to content

Instantly share code, notes, and snippets.

🎧
codin'

James Hunt jhunt

🎧
codin'
View GitHub Profile
@jhunt
jhunt / cert-issuer.yml
Last active Jun 16, 2020
Gluon Kubernetes Controller Deployment YAML
View cert-issuer.yml
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: internal-ca
namespace: cert-manager
spec:
selfSigned: {}
@jhunt
jhunt / kubernetes.yml
Last active May 30, 2020
A Gluon Deployment for Kubernetes
View kubernetes.yml
---
apiVersion: v1
kind: ConfigMap
metadata:
name: buffalo-lab-boshes
data:
vcenter_ip: your.vsphere.example.com
vcenter_dc: dc1
vcenter_cluster: cluster1
@jhunt
jhunt / just-a-pod.yml
Created Feb 12, 2020
Running Pods (natively) ain't such a great idea, after all.
View just-a-pod.yml
apiVersion: v1
kind: Pod
metadata:
name: its-a-pod
spec:
containers:
- image: filefrog/k8s-hacks:falldown
name: its-a-pod
@jhunt
jhunt / Watching-Upstream-Releases.md
Last active Feb 2, 2020
Watching Upstream HTTP Download Sites for New Versions
View Watching-Upstream-Releases.md

Watching Upstream Releases

For a while now I've had an idea for a VERY lightweight CI/CD solution based on Kubernetes CronJobs, and a bespoke set of heuristic "version checkers" that can parse a single source -- HTTP downloads listing, a GitHub repository's release feed, etc. -- and determine if you need to go download a new thing.

This is a quick hacky sketch of what those checkers might look like, because it's late, I can't sleep, and I'm otherwise unoccupied.

@jhunt
jhunt / gist:3d3200fca04b6d6614766a920fbc8453
Created Aug 15, 2019
Patch for provider ID args based on BOSH vm name / ID
View gist:3d3200fca04b6d6614766a920fbc8453
diff --git a/jobs/kubelet/templates/bin/kubelet b/jobs/kubelet/templates/bin/kubelet
index c5b0e52..a52cb13 100644
--- a/jobs/kubelet/templates/bin/kubelet
+++ b/jobs/kubelet/templates/bin/kubelet
@@ -34,6 +34,7 @@ end
# set kube-* binaries in our path
export PATH=$PATH:/var/vcap/packages/k8s/bin
+export PATH=$PATH:/var/vcap/packages/jq/bin
View gist:f5c5fb5da882628a3c777784eb3f1eb3
# Internship Projects
#sw
These are write-ups for potential internship projects. These projects are fully self-contained (though they most assuredly exist within the confines of a larger project like SHIELD or Cloud Foundry), and can be executed within 3 months by a team of 3-4 moderately talented junior-year computer science students.
## SHIELD etcd Data Protection Plugin
The Kubernetes container orchestration system relies on a single persistent data store for its metadata and configuration needs: etcd. This distributed key-value store is vital to the proper operation of Kubernetes and, assuming identical replacement hardware / component configuration, the data in etcd is all that an operator needs to resurrect a dead cluster.
Design and build a SHIELD Data Protection Plugin for backing up the data in etcd, and restoring data to etcd from those archives. This plugin must work within the existing contract SHIELD has for "target" plugins. To enable this effort, you will need to be able to deploy and va
@jhunt
jhunt / hunternetes.sh
Created Nov 22, 2018
hunternetes - A Kubernetes bootstrap script for Linode
View hunternetes.sh
#!/bin/bash
set -eu
useradd jhunt -Nm -c 'James Hunt' -d /home/jhunt -g staff -G staff -s /bin/bash
cat >/etc/sudoers.d/staff <<EOF
%staff ALL=(ALL:ALL) NOPASSWD:ALL
EOF
install -d -o jhunt -g staff -m 0700 ~jhunt/.ssh
View top.md

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Fri, 29 Sep 2017 17:55:27 GMT till Sat, 29 Sep 2018 17:55:27 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
  .filter(user => user.followers > 1000)
@jhunt
jhunt / codesign_gdb.md
Last active Aug 26, 2018 — forked from hlissner/codesign_gdb.md
Codesign gdb on OSX
View codesign_gdb.md

Note: these instructions are for pre-Sierra MacOS. Sierra Users: see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow.

If you are getting this in gdb on OSX while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
View API.md

Hush API

Hush is a dead-simple, no-frills credentials management and secure storage vault. It aims to be secure, stable, and simple, in that order.

Vault Operations

To query the status of the Vault:

You can’t perform that action at this time.