All Projects → observatorium → thanos-receive-controller

observatorium / thanos-receive-controller

Licence: Apache-2.0 license
Kubernetes controller to automatically configure Thanos receive hashrings

Programming Languages

go
31211 projects - #10 most used programming language
Jsonnet
166 projects
Makefile
30231 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to thanos-receive-controller

d3-graph-controller
A TypeScript library for visualizing and simulating directed, interactive graphs.
Stars: ✭ 106 (+92.73%)
Mutual labels:  controller
kube-code-generator
Kubernetes code generator docker image
Stars: ✭ 60 (+9.09%)
Mutual labels:  controller
mpc
A software pipeline using the Model Predictive Control method to drive a car around a virtual track.
Stars: ✭ 119 (+116.36%)
Mutual labels:  controller
chpc
CHPC: Cheap Heat Pump Controller
Stars: ✭ 27 (-50.91%)
Mutual labels:  controller
XB1ControllerBatteryIndicator
A tray application that shows a battery indicator for an Xbox-ish controller and gives a notification when the battery level drops to (almost) empty.
Stars: ✭ 536 (+874.55%)
Mutual labels:  controller
php-mvc
Mini framework para aplicaciones PHP con el patrón MVC
Stars: ✭ 35 (-36.36%)
Mutual labels:  controller
stadiacontroller
Command line application that emulates an Xbox 360 controller from a wired Stadia controller on Windows.
Stars: ✭ 142 (+158.18%)
Mutual labels:  controller
droid controller
Control the parameters of an Android system with the power of Xposed framework. 通过Xposed框架控制Android参数。
Stars: ✭ 15 (-72.73%)
Mutual labels:  controller
MVVM-Design-Pattern-Demo
An Xcode 9 project written in Swift 4 code designed using the MVVM design pattern, truly extolling the virtues of MVVM over MVC.
Stars: ✭ 31 (-43.64%)
Mutual labels:  controller
FCND-Term1-P3-3D-Quadrotor-Controller
Udacity Flying Car Nanodegree - Term 1 - Project 3 - 3D Quadrotor Controller
Stars: ✭ 31 (-43.64%)
Mutual labels:  controller
atlas
Secure Distributed Thanos Deployment using an Observability Cluster
Stars: ✭ 39 (-29.09%)
Mutual labels:  thanos
Model-Predictive-Control
Udacity Self-Driving Car Engineer Nanodegree. Project: Model Predictive Control
Stars: ✭ 50 (-9.09%)
Mutual labels:  controller
SPX-GC
SPX is a graphics control client for live video productions and live streams using CasparCG, OBS, vMix, or similar software.
Stars: ✭ 178 (+223.64%)
Mutual labels:  controller
DualSenseWindows UE4
Unreal Engine 4 port of the Windows API for the PS5 DualSense controller created at Ohjurot/DualSense-Windows
Stars: ✭ 25 (-54.55%)
Mutual labels:  controller
RockerView
A game controller view
Stars: ✭ 21 (-61.82%)
Mutual labels:  controller
xbox360-controller-manager
Turn OFF your wireless xbox 360 controller on PC and see the battery status of the connected controllers.
Stars: ✭ 38 (-30.91%)
Mutual labels:  controller
sbuscontroller
This Arduino-Sketch lets you connect your SBUS compatible radio wirelessly as controller to your pc.
Stars: ✭ 24 (-56.36%)
Mutual labels:  controller
Thanos Dust
Thanos dust effect like google search
Stars: ✭ 81 (+47.27%)
Mutual labels:  thanos
Polyel-Framework
⚡️ Voltis Core: A PHP framework based on Swoole from the ground up
Stars: ✭ 22 (-60%)
Mutual labels:  controller
Fairtris
Clone of the official classic Tetris® game for the NES console, intended for Windows and Linux systems. It implements the original mechanics and includes many regional versions and several RNGs (all in one executable).
Stars: ✭ 30 (-45.45%)
Mutual labels:  controller

Thanos Receive Controller

The Thanos Receive Controller configures multiple hashrings of Thanos receivers running as StatefulSets on Kubernetes.
Based on an initial mapping of tenants to hashrings, the controller identifies the Pods in each hashring and generates a complete configuration file as a ConfigMap.

Build Status

Getting Started

First, provide an initial mapping of tenants to hashrings in a ConfigMap, e.g.:

cat <<'EOF' | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
  name: thanos-receive
  labels:
    app.kubernetes.io/name: thanos-receive
data:
  hashrings.json: |
    [
        {
            "hashring": "hashring0",
            "tenants": ["foo", "bar"]
        },
        {
            "hashring": "hashring1",
            "tenants": ["baz"]
        }
    ]
EOF

Next, deploy the controller, pointing it at the configuration file in the ConfigMap:

cat <<'EOF' | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
  name: thanos-receive-controller
  labels:
    app.kubernetes.io/name: thanos-receive-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: thanos-receive-controller
  template:
    metadata:
      labels:
        app.kubernetes.io/name: thanos-receive-controller
    spec:
      containers:
      - args:
        - --configmap-name=thanos-receive
        - --configmap-generated-name=thanos-receive-generated
        - --file-name=hashrings.json
        image: quay.io/observatorium/thanos-receive-controller
        name: thanos-receive-controller
EOF

Finally, deploy StatefulSets of Thanos receivers labeled with controller.receive.thanos.io=thanos-receive-controller. The controller lists all of the StatefulSets with that label and matches the value of their controller.receive.thanos.io/hashring labels to the hashring names in the configuration file. The endpoints for each hashring will be populated automatically by the controller and the complete configuration file will be placed in a ConfigMap named thanos-receive-generated. This configuration should be consumed as a ConfigMap volume by the Thanos receivers.

About the --allow-only-ready-replicas flag

By default, upon a scale up, the controller adds all new receiver replicas into the hashring as soon as they are in a running state. However, this means the new replicas will be receiving requests from other replicas in the hashring before they are ready to accept them. Due to the nature of how receiver works, it can take some time until receiver's storage is ready. Depending on your roll out strategy, you might see an increased failure rate in your hashring until enough replicas are in a ready state.

An alternative is to use the --allow-only-ready-replicas, which modifies this behavior. Instead, upon a scale-up, new replicas are added only after it is confirmed they are ready. This means:

  • Old replicas keep operating with the old hashring, until all new replicas are ready. Once this is true, the hashring is updated to include all replicas in the stateful set
  • New replicas will initially come up with the old hashring configuration. This means they will serve only as a "router" and any requests that they receive will be forwarded to replicas in the old hashring. Once all new receiver replicas are ready, the hashring will be updated to include both old and new replicas.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].