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
| # install consul | |
| helm install --name consul stable/consul --set Replicas=1 | |
| # install helm | |
| helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator | |
| helm install incubator/vault --set vault.dev=true --set vault.config.storage.consul.address="consul-consul:8500",vault.config.storage.consul.path="vault" | |
| # install postgres | |
| helm install stable/postgresql --set postgresUser=root,postgresPassword=root,postgresDatabase=rails_development |
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
| apiVersion: apps/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: vault-dynamic-secrets-rails | |
| labels: | |
| app: vault-dynamic-secrets-rails | |
| spec: | |
| replicas: 3 | |
| template: | |
| metadata: |
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
| const k8sClient = require('kubernetes-client').Client; | |
| const k8sConfig = require('kubernetes-client').config; | |
| const JSONStream = require('JSONStream'); | |
| const proxy = require('express-http-proxy'); | |
| const express = require('express'); | |
| const client = new k8sClient({ config: k8sConfig.getInCluster() }); | |
| const app = express(); | |
| let router; |
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
| provider "google" { | |
| credentials = "${file("account.json")}" | |
| project = "vault-sidecar" | |
| region = "europe-west2" | |
| } | |
| resource "google_container_cluster" "primary" { | |
| name = "vault-sidecar-cluster" | |
| zone = "europe-west2-a" | |
| remove_default_node_pool = true |
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
| resource "google_container_cluster" "primary" { | |
| name = "vault-sidecar-cluster" | |
| zone = "europe-west2-a" | |
| remove_default_node_pool = true | |
| } | |
| resource "google_container_node_pool" "primary_pool" { | |
| name = "primary-pool" | |
| cluster = "${google_container_cluster.primary.name}" | |
| zone = "europe-west2-a" |
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
| resource "kubernetes_cluster_role_binding" "operator-cluster-admin-binding" { | |
| metadata { | |
| name = "operator-cluster-admin-binding" | |
| } | |
| role_ref { | |
| api_group = "rbac.authorization.k8s.io" | |
| kind = "ClusterRole" | |
| name = "cluster-admin" | |
| } | |
| subject { |
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
| resource "google_sql_database_instance" "postgres" { | |
| name = "db-instance" | |
| database_version = "POSTGRES_9_6" | |
| region = "europe-west2" | |
| settings { | |
| tier = "db-f1-micro" | |
| } | |
| provisioner "local-exec" { |
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
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: cloudsqlproxy | |
| spec: | |
| replicas: 1 | |
| template: | |
| metadata: | |
| labels: | |
| app: cloudsqlproxy |
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
| provider "google" { | |
| credentials = "${file("creds/account.json")}" | |
| project = "vault-sidecar" | |
| region = "europe-west2" | |
| } | |
| provider "kubernetes" { | |
| } |
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
| apiVersion: apiextensions.k8s.io/v1beta1 | |
| kind: CustomResourceDefinition | |
| metadata: | |
| name: etcdclusters.etcd.database.coreos.com | |
| spec: | |
| group: etcd.database.coreos.com | |
| names: | |
| kind: EtcdCluster | |
| listKind: EtcdClusterList | |
| plural: etcdclusters |