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
ROLE_ARN="arn:aws:iam::XXXXXXXXXXXX:role/developer | |
USERNAME="developer" | |
ROLE=" - rolearn: ${ROLE_ARN}\n username: ${USERNAME}\n groups:\n - system:masters" | |
kubectl get -n kube-system configmap/aws-auth -o yaml | awk "/mapRoles: \|/{print;print \"$ROLE\";next}1" > /tmp/aws-auth-patch.yml | |
kubectl patch configmap/aws-auth -n kube-system --patch "$(cat /tmp/aws-auth-patch.yml)" |
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
#### | |
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
# software and associated documentation files (the "Software"), to deal in the Software | |
# without restriction, including without limitation the rights to use, copy, modify, | |
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
# permit persons to whom the Software is furnished to do so. | |
# |
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
## Delete a namespace that get stuck | |
> NS=`kubectl get ns |grep Terminating | awk 'NR==1 {print $1}'` && kubectl get namespace "$NS" -o json | tr -d "\n" | sed "s/\"finalizers\": \[[^]]\+\]/\"finalizers\": []/" | kubectl replace --raw /api/v1/namespaces/$NS/finalize -f - | |
## Delete a Pod that get stock | |
# Create the namespace if not exist | |
> kubectl create namespace <namespace_name> |
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
#!/usr/bin/env bash | |
set -Eeo pipefail | |
function check_sig() { | |
gpg --import ./ci/synced/aws-cli/aws_pub_key.txt \ | |
&& curl -o awscliv2.sig https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip.sig \ | |
&& gpg --verify awscliv2.sig awscliv2.zip \ | |
&& echo "GOOD" || echo "BAD" | |
} |
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
# import config. | |
# You can change the default config with `make cnf="config_special.env" build` | |
cnf ?= config.env | |
include $(cnf) | |
export $(shell sed 's/=.*//' $(cnf)) | |
# import deploy config | |
# You can change the default deploy config with `make cnf="deploy_special.env" release` | |
dpl ?= deploy.env | |
include $(dpl) |
OlderNewer