Please refere to sveltos documentation.
Sveltos supports an event-driven add-on deployment oworkflow:
- define what an event is;
- select on which clusters;
- 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/v1beta1
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/v1beta1
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.
Event manager is a Sveltos micro service in charge of deploying add-ons when certain events happen in managed clusters.
❤️ 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:
- Open a bug/feature enhancement on github
- Chat with us on the Slack in the #projectsveltos channel
- Contact Us
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.