k8s-event-logger-operator

module
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2020 License: Apache-2.0

README

Build Status Go Report Card

GitHub Release FOSSA Status

k8s event logger operator

This operator creates a logging pod that logs corev1.Event information as structured json log. The crd allows to configure the events to be logged.

Installation

Operator

The operator is insalled with helm.

helm upgrade --install eventlogger ./helm/
Custom Resource Definition (CRD)
apiVersion: eventlogger.bakito.ch/v1
kind: EventLogger
metadata:
  name: example-eventlogger
spec:
  kinds:
    - name: DeploymentConfig # the kind of the event source to be logged
      eventTypes: # optional
       - Normal
       - Warning
      matchingPatterns: # optional - regexp pattern to match event messages
       - .*
      skipOnMatch: false # optional - skip events where messages match the pattern. Default false


  eventTypes: # optional - define the event types to log. If no types are defined, all events are logged
    - Normal
    - Warning

  labels: # optional - additional labels for the pod
    name: value

  annotations: # optional - additional annotations for the pod
    name: value

  scrapeMetrics: false # optional att prometheus scrape metrics annotation to the pod. Default false

  namespace: "ns" # optional - the namespace to listen the events on. Default the current namespace

  serviceAccount: "sa" # optional - if a custom ServiceAccount should be used for the pod. Default ServiceAccount is automatically created
  
  logFields: # optional - map if custom log field names. Key then log field name / Value: the reflection fields to the value within the struct corev1.Event https://github.com/kubernetes/api/blob/master/core/v1/types.go
    - name: name
      path:
        - ObjectMeta
        - Name 
    - name: kind
      path:
        - InvolvedObject
        - Kind
    - name: type
      path:
        - Type

  https://github.com/kubernetes/api/blob/master/core/v1/types.go

License

FOSSA Status

Directories

Path Synopsis
cmd
pkg
apis/eventlogger
Package eventlogger contains eventlogger API versions.
Package eventlogger contains eventlogger API versions.
apis/eventlogger/v1
Package v1 contains API Schema definitions for the eventlogger v1 API group +k8s:deepcopy-gen=package,register +groupName=eventlogger.bakito.ch Package v1 contains API Schema definitions for the eventlogger v1 API group +k8s:deepcopy-gen=package,register +groupName=eventlogger.bakito.ch
Package v1 contains API Schema definitions for the eventlogger v1 API group +k8s:deepcopy-gen=package,register +groupName=eventlogger.bakito.ch Package v1 contains API Schema definitions for the eventlogger v1 API group +k8s:deepcopy-gen=package,register +groupName=eventlogger.bakito.ch
mock/logr
Package logr is a generated GoMock package.
Package logr is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL