- We want an API server for CRUDing nearly identical k8s specs, but want to be able to customize anything about any one of them.
- Chose gRPC/Protocol Buffers for the API, primarily for the free code generation, but also for the advanced networking smarts built into gRPC. Swagger docs and a JSON/Rest gateway can be auto-generated from the proto file.
- A major goal for the project is replica safety. - We want to run multiple copies of the API server to eliminate the majority of types of downtime for clients.
- I went through 2 major re-writes on this project.
- The first version was a quick spike as a Golang package for use in custom apps. It uses jq (and yq) to render yaml templates and apply them via kubectl.
- I then decided that with the right abstractions an open source app could be developed (hambone).
- hambone's first version was built as a standalone binary, with plug-able state storage and k8s adapters. It hoped to avoid executing other processes (often miss-referenced as "shelling out",) and
This file contains hidden or 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 | |
# Usage: | |
# `./find_duplicates.rb 'directory to search*'` for a dry run, and | |
# `./find_duplicates.rb 'directory to search*' --delete` to actually delete the duplicates. | |
find_path = ARGV[0] | |
delete = false | |
delete = true if ARGV[1] == "--delete" | |
files = `find #{find_path} -type f`.split "\n" |
This file contains hidden or 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
Section "InputClass" | |
MatchIsTouchpad "on" | |
Identifier "Touchpads" | |
Driver "mtrack" | |
# TrackpadDisable - Disables trackpad touch input. A value of 0 will enable the trackpad. A value of 1 will disable tapping and gestures but not movement. A value of 2 will disable all input. A value of 3 will also disable physical buttons. Integer. Default is 0. | |
# Sensitivity - Adjusts the sensitivity (movement speed) of the touchpad. This is a real number greater than or equal to zero. Default is 1. A value of 0 will disable pointer movement. | |
Option "Sensitivity" "0.65" | |
# FingerHigh - Defines the pressure at which a finger is detected as a touch. This is a percentage represented as an integer. Default is 5. | |
Option "FingerHigh" "12" | |
# FingerLow - Defines the pressure at which a finger is detected as a release. This is a percentage represented as an integer. Default is 5. |
This file contains hidden or 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
Mon Aug 15 17:26:01 UTC 2016 |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
"syscall" | |
"time" | |
) |
Object store systems like Openstack Swift, Minio, and Ceph are worth consideration. They offer various advantages in scalability, accessibility, and things like arbitrary object metadata. Most of them also have S3 compatible APIs if that makes things easier.
If instead we need or desire to read files from traditional mounted filesystems, GlusterFS is one option worth considering. With it's Distributed Replicated configuration, storage space can be scaled by adding more disks, and access speed can be scaled by adding more nodes. It's supported by Kubernetes, and has systems for asynchronous replication, usually used for syncing the data to another datacenter. It can support replicate
This file contains hidden or 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
#!/bin/bash | |
if [ "$1" != "snarly" ] && [ "$1" != "fr" ]; then | |
echo "specify snarly or fr" | |
exit 1 | |
fi | |
if [ "$1" == "snarly" ]; then | |
find . -name '*.go' | xargs sed -i.bak 's/ForgeRock\/secret-agent/snarlysodboxer\/secret-agent/' | |
sed -i.bak 's/ForgeRock\/secret-agent/snarlysodboxer\/secret-agent/' go.mod |
This file contains hidden or 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
# .config/yamllint/config | |
--- | |
extends: default | |
rules: | |
empty-lines: | |
max-end: 1 | |
indentation: | |
indent-sequences: false | |
line-length: |
This file contains hidden or 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 bash | |
set -o pipefail -o errexit | |
# use like: | |
# ./stern-all-contexts.sh <pod-name> | |
# or: | |
# EXCLUDE_CONTEXTS='docker-desktop|other-context' ./stern-all-contexts.sh <pod-name> | |
EXCLUDE_CONTEXTS=${EXCLUDE_CONTEXTS:-docker-desktop} |
OlderNewer