This file contains hidden or 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
argocd login localhost:8080 --skip-test-tls --username admin --grpc-web --plaintext --password (kubectl get secret -n argocd argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)I |
This file contains hidden or 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
kubectl get secret -n argocd argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d | pbcopy && kubectl -n argocd port-forward svc/argocd-server 8080:80 & sleep 2 && open http://localhost:8080 && fg |
This file contains hidden or 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
function eks_context | |
set -l operator_choice ( | |
tailscale status \ | |
| awk ' | |
/-operator/ { | |
name=$2; | |
status=substr($0, index($0,$5)); | |
color = (status ~ /active/) ? "\033[32m" : \ | |
(status ~ /offline/) ? "\033[31m" : "\033[90m"; | |
printf "%s\t%s%s\033[0m\n", name, color, status |
This file contains hidden or 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
function ecr_profile_login -d "ECR docker login using current profile" | |
aws ecr get-login-password | docker login --username AWS --password-stdin (aws sts get-caller-identity --query Account --output text).dkr.ecr.(aws configure get region).amazonaws.com | |
end |
This file contains hidden or 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
convert-env-file-to-fish: ## take the existing .env and convert to fish format in .env.fish | |
@awk '{ split($$1, a, "="); printf "set -gx %s \"%s\"\n", a[1], a[2]; }' .env > .env.fish |
This file contains hidden or 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
.DEFAULT_GOAL := help | |
.PHONY: help | |
help: ## This help message | |
@awk -F '[, ]+' '/^[a-zA-Z0-9_-]+:.*##/ { \ | |
target = $$0; \ | |
sub(/^[ \t]*/, "", target); \ | |
sub(/:.*##/, "##", target); \ | |
split(target, parts, "##"); \ | |
gsub(/^[ \t]*|[ \t]*$$/, "", parts[1]); \ |
This file contains hidden or 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
name: Example of building a container and it's relevant helm chart, and pushing to container registry | |
on: | |
release: | |
types: [ published ] | |
permissions: | |
contents: read | |
jobs: |
This file contains hidden or 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
########################################## | |
# Cert manager | |
########################################## | |
data "http" "cert_manager_crds" { | |
url = "https://github.com/cert-manager/cert-manager/releases/download/v${var.cert_manager_version}/cert-manager.crds.yaml" | |
} | |
locals { | |
cert_manager_crds = { |
This file contains hidden or 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
# It's recommended to install this before the chart | |
# This is part of bootstrapping a cluster, | |
# but you probably should not be doing it this way, dingus | |
data "http" "cm_crds" { | |
url = "https://github.com/cert-manager/cert-manager/releases/download/v${var.cert_manager_version}/cert-manager.crds.yaml" | |
} | |
locals { | |
crd_map = { |
This file contains hidden or 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
terraform { | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = "~> 4.0" | |
} | |
azuread = { | |
source = "hashicorp/azuread" | |
version = "~> 3.0" |
NewerOlder