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
#!/bin/sh | |
# This is a secret decryption script that will decrypt ejson-kms secrets and | |
# export them to the shell environment. | |
# | |
# It expects two sane defaults: | |
# 1. That $ENV has been set already, so that we know which environment we're in | |
# and what secrets to export. | |
# 2. That the location of your secrets are either relative at | |
# _infra/secrets/$ENV.json or absolutely located at /opt/_infra/secrets/$ENV.json. |
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
#!/bin/sh | |
set -eo pipefail | |
# get ejson2env | |
wget -q https://gist.github.com/noqcks/88304840eb85e6d7ac6d3dcfe1fa9bc4/raw/e8d7beaa89ec8a819489852d023dc641b027748c/ejson2env | |
chmod +x ejson2env | |
mv ejson2env /usr/bin/ejson2env | |
# exit if $ENV doesn't exist. Not sure what environment to decrypt! |
This file has been truncated, but you can view the full file.
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
package main | |
// the equivalent of kubectl set image deployment/api api="image" | |
import ( | |
"fmt" | |
patchtype "k8s.io/apimachinery/pkg/types" | |
"k8s.io/client-go/kubernetes" | |
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc" | |
"k8s.io/client-go/rest" |
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
.PHONY: app api chat api_worker setup | |
setup: | |
brew install yarn | |
brew install rabbitmq | |
brew install mongodb | |
brew install redis | |
app: | |
cd app/ && yarn |
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
#!/bin/bash | |
# run as './task.sh >> $(hostname)-$(date +%Y-%m-%d).txt 2>&1' | |
set -e | |
set -x | |
ssh -V | |
# list interfaces |
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
--- | |
version: '3' | |
services: | |
node: | |
image: node:9 | |
ports: | |
- 8002:8002 | |
env_file: .env | |
volumes: | |
- ./:/usr/src/app:nocopy |
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
FROM node:9-alpine | |
# node-sass requirements... | |
RUN apk --no-cache add --virtual native-deps g++ gcc libgcc libstdc++ \ | |
linux-headers make python && \ | |
apk del native-deps | |
WORKDIR /usr/src/app | |
COPY entrypoint.sh /entrypoint.sh |
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: audit.k8s.io/v1beta1 | |
kind: Policy | |
rules: | |
— level: RequestResponse | |
omitStages: | |
— RequestReceived | |
resources: | |
— group: "" | |
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":"Event", | |
"apiVersion":"audit.k8s.io/v1beta1", | |
"metadata":{ "creationTimestamp":"2018-03-21T21:47:07Z" }, | |
"level":"Metadata", | |
"timestamp":"2018-03-21T21:47:07Z", | |
"auditID":"20ac14d3-1214-42b8-af3c-31454f6d7dfb", | |
"stage":"RequestReceived", | |
"requestURI":"/api/v1/namespaces/default/persistentvolumeclaims", | |
"verb":"list", |