Giter VIP home page Giter VIP logo

terraform-tinfoil-tiller's Introduction

terraform secure deployment of helm's “a giant sudo server”

Build Status

This module provides for a simple installation of helms tiller agent that is only accessible by establishing a proxy via the k8s API per this article: https://engineering.bitnami.com/articles/helm-security.html .

helm provider 0.6.2 vendors helm 2.9.0, which does not correctly deploy tiller with rbac enabled. The manual patching is not required with this module.

kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"automountServiceAccountToken":true}}}}'

Usage

resource "kubernetes_namespace" "tiller" {
  metadata {
    name = "tiller"
  }
}

module "tiller" {
  source = "git::https://github.com/lsst-sqre/terraform-tinfoil-tiller.git?ref=0.10.x"

  namespace = "${kubernetes_namespace.tiller.metadata.0.name}"
}

provider "helm" {
  version = "~> 0.10.0"

  service_account = "${module.tiller.service_account}"
  namespace       = "${module.tiller.namespace}"
  install_tiller  = false

  kubernetes {
    ...
  }
}

Inputs

Name Description Type Default Required
namespace kubernetes namespace to deploy into string "kube-system" no
service_account kubernetes service account name string "tiller" no
tiller_image tiller docker image. string "gcr.io/kubernetes-helm/tiller:v2.14.1" no

Outputs

Name Description
namespace kubernetes namespace in which tiller is installed
service_account name of kubernetes service account for tiller

pre-commit hooks

go get github.com/segmentio/terraform-docs
pip install --user pre-commit
pre-commit install

# manual run
pre-commit run -a

See Also

terraform-tinfoil-tiller's People

Contributors

jhoblitt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-tinfoil-tiller's Issues

Created releases

Can you create releases and version them according to the Helm release it supports? For example, your release version would be 0.7 for helm provider version 0.7 etc. You could use minor versions if you have to add bug fixes etc.

Wait for tiller to be to be running

Hi.

I think a good option would be to wait for the tiller to be up and running. I'm using current module like:

module "tiller" {
  source = "git::https://github.com/lsst-sqre/terraform-tinfoil-tiller.git//?ref=master"

  namespace = "kube-system"
  service_account = "tiller"
  tiller_image = "gcr.io/kubernetes-helm/tiller:v2.12.2"
}

provider "helm" "k8s_helm" {
  version = "~> 0.7.0"

  install_tiller = false
  debug = true
  service_account = "${module.tiller.service_account}"
  namespace = "${module.tiller.namespace}"


  kubernetes {
    host = "${digitalocean_kubernetes_cluster.k8s.endpoint}"

    client_certificate = "${base64decode(digitalocean_kubernetes_cluster.k8s.kube_config.0.client_certificate)}"
    client_key = "${base64decode(digitalocean_kubernetes_cluster.k8s.kube_config.0.client_key)}"
    cluster_ca_certificate = "${base64decode(digitalocean_kubernetes_cluster.k8s.kube_config.0.cluster_ca_certificate)}"
  }
}

and I can't set depends_on because this works only on resources. But inside module we can add this options.

Thx.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.