Skip to content

Instantly share code, notes, and snippets.

@innovia
innovia / pget.go
Created June 10, 2020 16:47 — forked from montanaflynn/pget.go
Bounded Parallel Get Requests in Golang
package main
import (
"fmt"
"net/http"
"sort"
"time"
)
// a struct to hold the result from each request including an index
@innovia
innovia / pod.yaml
Created March 19, 2020 21:12
vault annotation for secrets-consumer-webhook
annotations:
vault.security/enabled: "true"
vault.security/vault-addr: "https://vault.default.svc.cluster.local:8200"
vault.security/vault-role: "some-role"
vault.security/vault-path: "secret_v1/service/"
vault.security/vault-tls-secret-name: "vault-consul-ca"
vault.security/vault-use-secret-names-as-keys: "true"
apiVersion: cloud.google.com/v1beta1
kind: BackendConfig
metadata:
name: config-default
spec:
iap:
enabled: true
oauthclientCredentials:
secretName: my-secret
apiVersion: networking.gke.io/v1beta1
kind: ManagedCertificate
metadata:
name: vault-ui-certificate
spec:
domains:
- vault.domain.com
@innovia
innovia / vault-gke-values.yaml
Last active June 16, 2020 19:19
Vault GKE Values
global:
tlsDisable: false
server:
# resources:
# requests:
# memory: 256Mi
# cpu: 250m
# limits:
# memory: 256Mi
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: tester
namespace: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
env:
- name: DB_PASS
value: "vault:DB_PASS"
annotations:
vault.security/enabled: "true"
vault.security/vault-addr: "https://vault.default.svc.cluster.local:8200"
vault.security/vault-role: "vault-role"
vault.security/vault-path: "secret/some/path/in/vault"
vault.security/vault-tls-secret-name: "vault-consul-ca"
## main.tf
resource "aws_s3_bucket" "s3_bucket" {
count = "${var.enabled}"
bucket = "${local.bucket_name}"
region = "${var.region}"
force_destroy = "${var.force_destroy}"
acl = "private"
versioning = {
enabled = "${var.versioning_enabled}"
@innovia
innovia / Dockerfile
Last active December 9, 2018 15:13
Dockerfile MultiStage SSH Mount
# syntax=docker/dockerfile:1.0.0-experimental
## For this to work you must run `export DOCKER_BUILDKIT=1`
## then build using the command
## docker build --ssh github_ssh_key=/Users/<your_username>/.ssh/id_rsa .
## Stage 1
FROM python:2.7.15-alpine3.7 AS base