Skip to content

Installation

Vova Nekhai edited this page Jun 16, 2020 · 3 revisions

Anodot Kube Events

Application is used to send Events from Kubernetes cluster to Anodot system.

Supported kubernetes versions

< v1.16

Supported Kubernetes objects types for generating events:

  • deployment (image changes, replica number changes)
  • daemonset (image changes, replica number changes)
  • job (started and completed time)
  • secret (update operation)
  • configmap (update operation)
  • statefulset (image changes, replica number changes)

Installation

helm repo add anodot https://anodot.github.io/helm-charts
helm fetch anodot/anodot-kube-events --untar

Navigate to anodot-kube-events folder and edit values.yaml with required values.

  1. set ANODOT_API_TOKEN and ANODOT_URL enviroment variables.
  2. edit configuration.events by following next example
  events:
  # name of object in Kubernetes cluster. See Supported Kubernetes objects section
    configmap:
  # namespace to include. "" - means all namespaces.
    namespace: ""
  # events will be triggered if enabled set to true
      enabled: true or false
      eventConfig:
      # Anodot Event category
        category: "deployment"
      # Anodot Event source
        source: "kubernetes"
  # exlude configuration, for some objects that should not produce events when their state chaged. 
      exclude:
  # kubernetes namespaces to exlude. Regex (RE2) supported
        namespace: 
         - "kube-system"
  # kubernetes object labels to exlude. Regex (RE2) supported for values.
        labels:
          OWNER: "TILLER"
          MANAGED_BY: ".*"
  # kubernetes object annotations to exlude. Regex (RE2) supported for values.
        annotations:
          "control-plane.alpha.kubernetes.io/leader": ".*"

if namespace or labels or annotations or are not set or blank - every object of given type is included.

  1. Each event can have separate category and source defined in .configuration.events.OBJECT_TYPE.eventConfig

or can be set globally for all kubernetes obejct types by defining ANODOT_EVENT_CATEGORY and ANODOT_EVENT_SOURCE envirotment variables under configuration.env section.

Categories and Sources needs to be created manually in Anodot UI

Run next command to install chart

helm upgrade -i anodot-kube-events . --namespace=monitoring

RBAC

anodot-kube-events application requires access to next resources to assign ordinal labels. RBAC configuration applied by default. To tun off RBAC configuration, use --set rbac.enabled=false