- curl
- k8s-yaml-splitter (
go get github.com/latchmihay/k8s-yaml-splitter
) - gnu sed
- yq (jq wrapper for yaml files -
pip install yq
)
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
2020/02/24 13:32:25 [DEBUG] Starting graph walk: walkValidate | |
6e4374afabd81544fc5ebe", sending new deps | |
2020-02-24T13:32:25.087+0100 [INFO] plugin: configuring client automatic mTLS | |
2020-02-24T13:32:25.115+0100 [DEBUG] plugin: starting plugin: path=/home/martyn/src/github.com/freight-hub/infrastructure-terraform/environments/sandbox/aws/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.50.0_x4 args=[/home/martyn/src/github.com/freight-hub/infrastructure-terraform/environments/sandbox/aws/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.50.0_x4] | |
2020-02-24T13:32:25.115+0100 [DEBUG] plugin: plugin started: path=/home/martyn/src/github.com/freight-hub/infrastructure-terraform/environments/sandbox/aws/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.50.0_x4 pid=17118 | |
2020-02-24T13:32:25.115+0100 [DEBUG] plugin: waiting for RPC address: path=/home/martyn/src/github.com/freight-hub/infrastructure-terraform/environments/sandbox/aws/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.50.0 |
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 | |
ZONEFILE=$1 | |
grep 'ORIGIN\|A\W\+[0-9]\{1,3\}' $ZONEFILE | awk '{if ($1 == "$ORIGIN") {mydomain=$2} else if ($2 == "A") {print $3 " " mydomain} else {{print $4 " " $1 "." mydomain}}}' |
I hereby claim:
- I am iMartyn on github.
- I am imartyn (https://keybase.io/imartyn) on keybase.
- I have a public key whose fingerprint is 4B37 1244 4E36 6B22 E2B7 8CA9 C6EE 3F21 DD37 0D86
To claim this, I am signing this object:
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 | |
MINIKUBE_IP=$(minikube ip) | |
MINIKUBE_KEY_LOCATION=${HOME}/.minikube/machines/minikube/id_rsa | |
STARTING_PORT=8080 | |
CURRENT_PORT=${STARTING_PORT} | |
for servicename in $*; do | |
HIGH_PORT=$(kubectl get svc ${servicename} -o custom-columns=':spec.ports[*].nodePort' | tail -n1) | |
if echo $HIGH_PORT | grep -q ,; then |
Because people don't seem to be getting why this is a bug, I'm gonna try and show it here in clear examples :
This example is of for example a nodejs microservice with pods with label app: data-app
listening on Port: 3000
This is exposed as a service in the cluster as a http endpoint and should be accessible inside the cluster as http://coolservice(.namespace.svc.cluster.local)/
This should also be exposed as https://mycoolservice.example.com/
It should not be exposed inside the cluster as http://coolservice:443/ as that is whilst not RFC breaking afaik, extremely bad practice and extremely hard for users to reason about.
Exhibit A : Listens externally on port 80 as SSL! :
apiVersion: v1
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 | |
CALLEDFROM=${PWD} | |
SEARCHFOR='^- apiVersion.*' | |
OPTIND=1 | |
NAMESPACED=0 | |
while getopts "n" opt; do | |
case "${opt}" in | |
n) |
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
#general | |
<match fluent.**> | |
type null | |
</match> | |
<source> | |
@type http | |
port 9880 | |
bind 0.0.0.0 | |
</source> | |
<source> |
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 | |
# Uncomment below if you want the commit messages to start [refs: jira-123] or you'll just get [jira-123] | |
#PREAMBLE="refs: " | |
SED=sed | |
# If you're on mac and you don't have gnu sed installed, heaven help you. | |
if uname | grep "Darwin" 2>&1 > /dev/null; then | |
SED=gsed |
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
# Put in your .bashrc : | |
#Include branch in prompt | |
__git_ps1 () | |
{ | |
local b="$(git symbolic-ref HEAD 2>/dev/null)"; | |
if [ -n "$b" ]; then | |
printf " (%s)" "${b##refs/heads/}"; | |
fi | |
} |
NewerOlder