event-manager

command module
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

README

CI Go Report Card Slack License Twitter Follow

Sveltos

Please refere to sveltos documentation.

Event driven framework in action

Sveltos supports an event-driven add-on deployment oworkflow:

  1. define what an event is;
  2. select on which clusters;
  3. define which add-ons to deploy when event happens.

EventSource is the CRD introduced to define an event.

Sveltos supports custom events written in Lua.

Following EventSource instance define an event as a creation/deletion of a Service with label sveltos: fv.

apiVersion: lib.projectsveltos.io/v1alpha1
kind: EventSource
metadata:
 name: sveltos-service
spec:
 collectResources: true
 group: ""
 version: "v1"
 kind: "Service"
 labelsFilters:
 - key: sveltos
   operation: Equal
   value: fv

Sveltos supports custom events written in Lua. Following EventSource instance again defines an Event as the creation/deletion of a Service with label sveltos: fv but using a Lua script.

apiVersion: lib.projectsveltos.io/v1alpha1
kind: EventSource
metadata:
 name: sveltos-service
spec:
 collectResources: true
 group: ""
 version: "v1"
 kind: "Service"
 script: |
  function evaluate()
    hs = {}
    hs.matching = false
    hs.message = ""
    if obj.metadata.labels ~= nil then
      for key, value in pairs(obj.metadata.labels) do
        if key == "sveltos" then
          if value == "fv" then
            hs.matching = true
          end
        end
      end
    end
    return hs
  end

EventTrigger is the CRD introduced to define what add-ons to deploy when an event happens.

Sveltos Event Driven Framework

Event manager is a Sveltos micro service in charge of deploying add-ons when certain events happen in managed clusters.

Contributing

❤️ Your contributions are always welcome! If you want to contribute, have questions, noticed any bug or want to get the latest project news, you can connect with us in the following ways:

  1. Open a bug/feature enhancement on github contributions welcome
  2. Chat with us on the Slack in the #projectsveltos channel Slack
  3. Contact Us

License

Copyright 2022.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the lib v1alpha1 API group +kubebuilder:object:generate=true +groupName=lib.projectsveltos.io
Package v1alpha1 contains API Schema definitions for the lib v1alpha1 API group +kubebuilder:object:generate=true +groupName=lib.projectsveltos.io
internal
pkg

Jump to

Keyboard shortcuts

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