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
kind: Namespace | |
apiVersion: v1 | |
metadata: | |
name: sock-shop | |
--- | |
kind: Namespace | |
apiVersion: v1 | |
metadata: | |
name: polaris | |
--- |
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
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"github.com/aws/aws-sdk-go-v2/aws" | |
"github.com/aws/aws-sdk-go-v2/config" | |
"github.com/aws/aws-sdk-go-v2/service/eks" | |
"github.com/aws/aws-sdk-go-v2/service/iam" |
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
TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` | |
REGION=`curl -s -o /dev/null -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/placement/region` | |
VERSION=$(aws eks describe-cluster --name default_capi-eks-quickstart-control-plane --region $REGION | jq -r .cluster.version) | |
aws eks update-kubeconfig --name default_capi-eks-quickstart-control-plane --region $REGION | |
curl -LO --output-dir /usr/local/bin https://dl.k8s.io/release/$(VERSION)/bin/linux/amd64/kubectl | |
chmod +x /usr/local/bin/kubectl | |
if [[ -z "${SUBPATH}" ]]; then | |
export SUBPATH="forensics" | |
fi |
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
package main | |
import ( | |
"context" | |
"github.com/aws-controllers-k8s/eks-controller/apis/v1alpha1" | |
"github.com/aws/aws-sdk-go/aws" | |
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" | |
"k8s.io/apimachinery/pkg/runtime" |
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
package main | |
import ( | |
"context" | |
"github.com/aws/aws-lambda-go/lambda" | |
"github.com/aws/aws-sdk-go-v2/aws" | |
"github.com/aws/aws-sdk-go-v2/config" | |
"github.com/aws/aws-sdk-go-v2/service/ec2" | |
"github.com/aws/aws-sdk-go-v2/service/ecs" | |
"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2" |
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 boto3 | |
from botocore.exceptions import ClientError | |
s3_client = boto3.client('s3') | |
s3_bucket = boto3.resource('s3') | |
bucket_name = raw_input('Enter the name of the bucket that you want to enable MFA-delete on: ') | |
mfa_token = raw_input('Enter your MFA serial number and token code, e.g. <deviceSerialNumber> <tokenCode>: ') | |
try: | |
s3_bucket.meta.client.head_bucket(Bucket=bucket_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
bash -c ' | |
<%= "export https_proxy=\"#{knife_config[bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> | |
PACKAGE_URL="http://1.2.3.4/path-to-package-file/chef-11.16.2-1.el6.x86_64.rpm" | |
if [ ! -f /usr/bin/chef-client ]; then | |
curl -o /tmp/chef-client-package.rpm $PACKAGE_URL | |
rpm -Uvh /tmp/chef-client-package.rpm | |
fi |