Skip to content

Instantly share code, notes, and snippets.

View StevenACoffman's full-sized avatar

Steve Coffman StevenACoffman

View GitHub Profile
@StevenACoffman
StevenACoffman / a node-problem-detector Readme.md
Last active March 27, 2025 02:16
Draino and Node-problem-detector

Our remedy system looks like:

  1. Detect permanent node problems and set Node Conditions using the Node Problem Detector.
  2. Configure Draino to cordon and drain nodes when they exhibit the NPD's KernelDeadlock condition, or a variant of KernelDeadlock we call VolumeTaskHung.
  3. Let the Cluster Autoscaler scale down underutilised nodes, including the nodes Draino has drained.

Note: Draino will log nothing, and export no metrics until it actually drains a node.

Once the Descheduler supports descheduling pods based on taints, Draino could be replaced by the Descheduler running in combination with the scheduler's TaintNodesByCondition functionality. See kubernetes-sigs/descheduler#131

ARG FUNCTION_RUNTIME
FROM mikesir87/aws-cli as code
ARG FUNCTION_NAME
ARG AWS_DEFAULT_REGION
ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
RUN wget -O function.zip `aws lambda get-function --function-name $FUNCTION_NAME --query 'Code.Location' --output text`
@StevenACoffman
StevenACoffman / README.md
Created March 1, 2019 20:47 — forked from so0k/README.md
Post Google Sheets form entries to Slack

Post Google Sheets form entries to Slack

By using Google Form's script editor, you can call Slack webhooks when form submissions are made. You can use this script to do things like creating a live feedback form for taking questions from an audience or notifying your team when someone signs up for an event.

Setup

First, be sure you're collecting the email address in the form:

'img'

# This role and instance profile gives worker nodes the necessary EKS and ECR permissions
# First, create the role - EC2 may assume this role to have EKS and ECR permissions
cat <<EOF > eks-node-instance-assume-role-policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
@StevenACoffman
StevenACoffman / styled-components-popularity.md
Created February 2, 2019 13:49
styled-components component kits

React component ui kits that are popular NPM Charts

@StevenACoffman
StevenACoffman / Codesign with aws-vault.md
Last active January 21, 2019 17:38
Codesigning AWS-Vault

Install Golang (skip if already done)

If you don't have golang installed, you need to do that and export GOPATH

if [[ ! $(go version 2>/dev/null) ]]
then
  brew install go --cross-compile-common
fi

export GOPATH=${GOPATH:-$HOME/go}
mkdir -p "$GOPATH"
@StevenACoffman
StevenACoffman / jamf.md
Created January 8, 2019 01:12 — forked from a7ul/jamf.md
removing all restrictions on jamf managed macos device - Provided you have root access.

REMOVE JAMF RESTRICTIONS ON MAC

REMOVE ONLY RESTRICTIONS

sudo jamf removeMDMProfile removes all restrictions

sudo jamf manage brings back all restrictions and profiles

REMOVE ALL RESTRICTIONS AND DISABLE JAMF BINARIES WHILE KEEPING YOUR ACCESS TO VPN AND OTHER SERVICES

sudo jamf removeMDMProfile removes all restrictions

@StevenACoffman
StevenACoffman / slackWebhook.md
Created January 2, 2019 14:14 — forked from lakshmantgld/slackWebhook.md
Configuring slack webhook

A Webhook, in simple terms, is a user-defined HTTP callback. It is a mechanism for the system to notify you about an event. In our case, we need to send messages to a particular channel in slack. Slack calls in Incoming Webhook. It is a mechanism to send messages to your Slack Channel from external sources. These external sources could be any application or service that is capable of sending a JSON payload over HTTP into a Slack Channel. Each Channel will be identified by a unique Incoming Webhook URL to which you can post the message from outside. This configuration is done via the Integrations for your channel.

Steps to create a incoming webhook in Slack:

  1. Naviagte to the Incoming Webhook URL. Click the hyper link incoming webhook integration below the heading Incoming Webhooks.
  2. You will be asked to enter your team URL, followed by your slack credentials.
  3. Once you have completed the above step, you will see the wizard kind of webpage to
@StevenACoffman
StevenACoffman / Rename.js
Last active December 14, 2018 02:25
Rename object
renameProp = (oldProp, newProp, {[oldProp]:old, ...others}) => ({ [newProp]: old, ...others })