Skip to content

Instantly share code, notes, and snippets.

View strongjz's full-sized avatar

James Strong strongjz

View GitHub Profile
@strongjz
strongjz / Makefile
Created November 1, 2023 22:04 — forked from prwhite/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-resource-backend
spec:
ingressClassName: nginx
rules:
- http:
paths:
- path: /
[strongjz@strongjz-linux ingress-nginx]$ make kind-e2e-test
Running e2e with nginx base image registry.k8s.io/ingress-nginx/nginx:bf8362cb500b413d04d04b1312df1914b4b193f8@sha256:9767d829a54c2941780b6e7e32d32ab55ff7bee79fee46d7bf04da3ad4d7166e
[dev-env] creating Kubernetes cluster with kind
Creating cluster "ingress-nginx-dev" ...
DEBUG: docker/images.go:58] Image: kindest/node:v1.25.2@sha256:9be91e9e9cdf116809841fc77ebdb8845443c4c72fe5218f3ae9eb57fdb4bace present locally
✓ Ensuring node image (kindest/node:v1.25.2) 🖼
✓ Preparing nodes 📦 📦 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
@strongjz
strongjz / taint_module.sh
Created April 20, 2022 19:34 — forked from justinclayton/taint_module.sh
Terraform: taint all resources from one module
#!/bin/bash
module=$1
for resource in `terraform show -module-depth=1 | grep module.${module} | tr -d ':' | sed -e 's/module.${module}.//'`; do
terraform taint -module ${module} ${resource}
done
starting build "6b338c03-2953-4c8a-a098-5722e8c24b80"
FETCHSOURCE
Fetching storage object: gs://k8s-staging-ingress-nginx-gcb/source/1630074027.761645-bb0fb4bf5ff944a48242cd0869d2d1d9.tgz#1630074027934759
Copying gs://k8s-staging-ingress-nginx-gcb/source/1630074027.761645-bb0fb4bf5ff944a48242cd0869d2d1d9.tgz#1630074027934759...
/ [0 files][ 0.0 B/ 16.0 MiB]
/ [1 files][ 16.0 MiB/ 16.0 MiB]
Operation completed over 1 objects/16.0 MiB.
BUILD
Pulling image: gcr.io/k8s-testimages/gcb-docker-gcloud:v20201130-750d12f
@strongjz
strongjz / docker-credentials.sh
Created September 4, 2020 19:19 — forked from piersharding/docker-credentials.sh
Create Docker config.json file credentials
#!/bin/bash
# This script creates a docker config.json file with the auth section
# as an example of what can be passed into GitLab-CI and used in
# conjunction with DOCKER_CONFIG - the config file directory location.
# command line parameter default values
DOCKER_REGISTRY=""
DOCKER_USER=""
DOCKER_PASSWORD=""
BEGIN MESSAGE.
3AVcYsIxqvEhhM8 Sk6DU6fxnHV1gWy HbflYwDl2XN98Xq IQAbJ1SGZhyW2Kq
hpTiUfmRAWswApG m7o16CTdeswTCKq 6Xr2MZHgg4XMNaW cNdGmLtQZJCVvHu
m6MYAJQ7KPws3sg Z9CXMDuUexo5gme wfZixtskO6dnpAE myEu9NOOHbrPBEO
TWUmA0KfKsfeTKs w2pj9MjeXFWuYxr M18K50Qz5Z.
END MESSAGE.
adns
aws-iam-authenticator
aws-sam-cli
aws-shell
awscli
azure-cli
bash-completion
coredns
ctags
eksctl
@strongjz
strongjz / Makefile
Created July 20, 2019 20:29
Hugo makefile
DOCKER = docker
HUGO_VERSION = 0.49
DOCKER_IMAGE = k8-hugo
DOCKER_RUN = $(DOCKER) run --rm --interactive --tty --volume $(PWD):/src
.PHONY: all build build-preview serve docker-all
all: build ## Build site with production settings
build: ## Build site with production settings