GithubHelp home page GithubHelp logo

global-localhost / deadmanssnitch-operator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openshift/deadmanssnitch-operator

0.0 0.0 0.0 18.66 MB

Operator to manage deadmanssnitch configs for Openshift Dedicated

License: Apache License 2.0

Dockerfile 0.46% Shell 29.95% Go 59.40% Makefile 5.60% Python 4.60%

deadmanssnitch-operator's Introduction

deadmanssnitch-operator

Operator to manage deadmanssnitch configs for Openshift Dedicated

Overview

The operator runs on hive. It has a single controller. It:

  • Requires a master Secret to talk to the Dead Man's Snitch API. This secret is expected to be named deadmanssnitch-api-key and live in the deadmanssnitch-operator namespace.
  • Pays attention to ClusterDeployments that are:
    • Installed (spec.installed=true)
    • Managed (label api.openshift.com/managed="true")
  • For each such ClusterDeployment:
    • Adds a finalizer to the ClusterDeployment to ensure we get a chance to clean up when it is deleted.
    • Creates a Snitch
    • Creates a Secret in the ClusterDeployment's namespace named {clusterdeploymentname}-dms-secret. The Secret contains the Snitch URL.
    • Creates a SyncSet in the ClusterDeployment's namespace named {clusterdeploymentname}-dms}. The SyncSet creates a SecretMapping that makes the above Secret appear inside the cluster as dms-secret in the openshift-monitoring namespace.

Metrics

metricDeadMansSnitchHeartbeat: Every 5 minutes, makes a request to the Dead Man's Snitch API using the API key and updates the gauge to 1 when the response code is between 200-299.

Alerts

  • DeadMansSnitchAPIUnavailable - Unable to communicate with Dead Man's Snitch API for 15 minutes.

Usage

  • Create an account on https://deadmanssnitch.com/
  • Choose a plan that allows enhanced snitch intervals(Private eye or above)
  • Create an API key
  • Create the following secret which is required for deadmanssnitch-operator to create snitches
apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: deadmanssnitch-api-key
  namespace: deadmanssnitch-operator
data:
  hive-cluster-tag: <Tag for snitches>
  deadmanssnitch-api-key: <deadmanssnitch API key here>
  • Build a docker image and replace REPLACE_IMAGE operator.yaml field with that image
  • Deploy using oc apply -f deploy/

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.