Code Monkey home page Code Monkey logo

terraform-operator-remote-controller's Introduction

Terraform Operator Remote Controller

This is another controller that listens to tf resource events. Add and update events will transmit the tf manifest to a TFO-API server.

Usage

Set up the following environment vars for the API server:

CLIENT_NAME=foo-k8s-cluster
TFO_API_PROTOCOL=http
TFO_API_HOST=localhost
TFO_API_PORT=5001
TFO_API_LOGIN_USER=username
TFO_API_LOGIN_PASSWORD=password

Make sure you're connected to a cluster:

KUBECONFIG=~/.kube/config

InCluster configuration is automatically configured when this binary runs in a kubernetes pod.

RBAC

This will require get and list permissions to terraforms resources:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
 name: tforc
rules:
- apiGroups:
  - tf.galleybytes.com
  resources:
  - terraforms
  verbs:
  - get
  - list

And run the binary or run an in-cluster container:

go run main.go

terraform-operator-remote-controller's People

Contributors

isaaguilar avatar

Watchers

 avatar

terraform-operator-remote-controller's Issues

no retry when a single failure to connect to api occurs

When the controller sees an update event and the API is down, there is no retry.
Here is what error I get

Put "https://localhost:8443/api/v1/cluster/microk8s/sync-dependencies": dial tcp [::1]:8443: connect: connection refused

What should happen is periodically the controller should queue up the task to send it again. Maybe all api requests should be held until the api and respond to a ping.

no retry when a single failure to connect to api occurs

When the controller sees an update event and the API is down, there is no retry.
Here is what error I get

Put "https://localhost:8443/api/v1/cluster/microk8s/sync-dependencies": dial tcp [::1]:8443: connect: connection refused

What should happen is periodically the controller should queue up the task to send it again. Maybe all api requests should be held until the api and respond to a ping.

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.