kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Deny", | |
"Action": [ | |
"iam:UpdateAccessKey", | |
"ec2:RequestSpotInstances", | |
"organizations:InviteAccountToOrganization", | |
"lightsail:DownloadDefaultKeyPair", |
#### first class expresssion | |
variable "ami" {} | |
resource "aws_instance" "example" { | |
ami = var.ami | |
} | |
#### list & map | |
resource "aws_instance" "example" { | |
vpc_security_group_ids = var.security_group_id != "" ? [var.security_group_id] : [] | |
} |
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval
(in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled
(true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags
(comma-separated list of key=value)service.beta.kubernetes.io/aws-load-balancer-backend-protocol
(http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled
(true|false)
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
#!/bin/bash | |
if [ "$(id -u)" = "0" ]; then | |
echo | |
echo "Do not run as root. Run as your user" | |
exit 2 | |
fi | |
usage() { echo "Usage: $0 -t <time needed> <salt-feature-branch>" 1>&2; exit 1; } |
FROM golang:1.6.2 | |
COPY . /go | |
RUN go get github.com/nats-io/nats | |
RUN go build api-server.go | |
EXPOSE 8080 | |
ENTRYPOINT ["/go/api-server"] |
#!/usr/bin/env ruby | |
files_modified = `git diff-index --cached --name-only HEAD`.split(/\n/) | |
# expand_tabs from Stack Overflow | |
# -> http://stackoverflow.com/a/8900610/1431239 | |
# This algorithm by Brian Candler (B.Candler@pobox.com) found on the | |
# org.ruby-lang.ruby-talk mailing list | |
# http://markmail.org/message/avdjw34ahxi447qk | |
# Date: 2003-5-31 13:35:09 | |
# Subject: Re: expandtabs |
#/bin/bash | |
check_xdebug_installed () { | |
INSTALLED=`php -m | grep xdebug` | |
if [ "$INSTALLED" = "" ]; then | |
echo "PHP extention 'xdebug' must be installed." | |
exit 1 | |
fi | |
} |