Skip to content

Instantly share code, notes, and snippets.

View mifisignal's full-sized avatar

Michael S. Fischer mifisignal

  • Amazon Web Services
  • Seattle, WA
View GitHub Profile
@mifisignal
mifisignal / amazon-eks-nodegroup.template.yaml
Created March 31, 2020 00:55
Amazon EKS (Unmanaged) Nodegroup CloudFormation Template
AWSTemplateFormatVersion: "2010-09-09"
Description: Amazon EKS - Node Group
Mappings:
ServicePrincipals:
aws-cn:
ec2: ec2.amazonaws.com.cn
aws:
ec2: ec2.amazonaws.com
apiVersion: rbac.authorization.k8s.io/v1
# This role binding allows "jane" to read pods in the "default" namespace.
# You need to already have a Role named "pod-reader" in that namespace.
kind: RoleBinding
metadata:
name: read-pods
namespace: default
subjects:
# You can specify more than one "subject"
- kind: User
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: default
name: pod-reader
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["pods"]
verbs: ["get", "watch", "list"]
@mifisignal
mifisignal / handler.py
Created June 17, 2020 04:36
Lambda function for propagating EKS managed nodegroup tags
#!/usr/bin/env python
import boto3
import botocore.exceptions
import logging
from time import sleep
MAX_ATTEMPTS = 100
def handler(event, context):

Keybase proof

I hereby claim:

  • I am otterley on github.
  • I am otterley (https://keybase.io/otterley) on keybase.
  • I have a public key whose fingerprint is 76F4 BE55 6BA4 6E5C 1D99 6AD7 E008 974D 1E3E C314

To claim this, I am signing this object: