Skip to content

Instantly share code, notes, and snippets.

Simon Massey simbo1905

Block or report user

Report or block simbo1905

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@simbo1905
simbo1905 / helmfile.yaml
Last active Sep 3, 2019
cod-builder-demo
View helmfile.yaml
repositories:
- name: ocd-meta
url: https://ocd-scm.github.io/ocd-meta/charts
releases:
- name: {{ requiredEnv "ENV_PREFIX" }}-realworld
labels:
builder: realworld
chart: ocd-meta/ocd-builder
version: "1.0.0"
values:
@simbo1905
simbo1905 / initContainerWriteEmptyDir.sh
Created Sep 2, 2019
use an initContainer to write configuration into an empty ephemeral folder
View initContainerWriteEmptyDir.sh
#!/bin/bash
cat | oc create -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: my-app
spec:
containers:
- name: realworld
image: docker.io/simonmassey/react-redux-realworld:v0.0.2
@simbo1905
simbo1905 / initContainerPvcWrite.sh
Created Sep 2, 2019
write out a config file to a PVCs wihin an initContainer
View initContainerPvcWrite.sh
#!/bin/bash
cat | oc create -f - <<EOF
---
apiVersion: "v1"
kind: "PersistentVolumeClaim"
metadata:
name: "config-data-claim"
spec:
accessModes:
- "ReadWriteMany"
@simbo1905
simbo1905 / HowTo.md
Created Apr 27, 2019
debug git-secret using bashdb and visual studio code
View HowTo.md

How To

Install bashdb which you can do from source or get from a package manager. On MacOS you can brew install bashdb.

Install Visual Studio Code and the Bash Debug plugin from the marketplace. See this blog article yet I didn't have to do any upgrades of build from source things worked pretty much out of the box after installing bashdb via Homebrew.

Use the debug.sh script in this gist as the entrypoint to be able to step through code.

@simbo1905
simbo1905 / helmfile-macos.sh
Created Apr 22, 2019
installl helmfile on macOS
View helmfile-macos.sh
#!/bin/sh
# Helmfile on MacOS
brew install helm
helm plugin install https://github.com/databus23/helm-diff
helm plugin install https://github.com/futuresimple/helm-secrets
brew install helmfile
brew install gnu-getopt
@simbo1905
simbo1905 / ocd-pre-apply-hook
Created Apr 12, 2019
md5 hash secrets to detect when to bounce apps
View ocd-pre-apply-hook
#!/bin/bash
oc get secrets | md5sum > /tmp/secrets.md5
View openshift-cheatsheet.md

My Openshift Cheatsheet

Examine the cluster quota defined for the environment:

$ oc describe AppliedClusterResourceQuota

Install pkgs using yum in a Dockerfile

@simbo1905
simbo1905 / how-to-make-a-slack-bot.md
Last active Feb 11, 2019
how to make a botkit slack bot on OpenShift.com
View how-to-make-a-slack-bot.md

fork the botkit slack starter repo

open https://github.com/howdyai/botkit-starter-slack

create a node.js app from your fork on openshift.com

open openshift.com

register a bot on api.slack.com

@simbo1905
simbo1905 / README.md
Last active Dec 31, 2018
Use GPG 2.0.22 to decrypt an .env file at start up within an OpenShift s2i image
View README.md

Use GPG 2.0.22 to decrypt an .env file at start up within an OpenShift s2i image

First, let's generate a strong passphrase to protect the private key. As we are being git driven we do this inside our environment repo:

# ensure that we don't accidentally publish the passphrase to the key
echo passphrase >> .gitignore
git add .gitignore
git commit -m "ignore passphrase"
# generate a random passphrase
@simbo1905
simbo1905 / security-warnings.txt
Created Dec 26, 2018
security warnings for a typical package.json
View security-warnings.txt
npm WARN notice [SECURITY] open has the following vulnerability: 1 critical. Go here for more details: https://nodesecurity.io/advisories?search=open&version=0.0.5 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] macaddress has the following vulnerability: 1 critical. Go here for more details: https://nodesecurity.io/advisories?search=macaddress&version=0.2.8 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] webpack-dev-server has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=webpack-dev-server&version=1.16.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN notice [SECURITY] react-dev-utils has the following vulnerability: 1 high. Go here for more details: https://nodesecurity.io/advisories?search=react-dev-utils&version=0.5.2 - Run `npm i npm@latest
You can’t perform that action at this time.