From 6da98e076fcf1ce1ff879328115637ab7e599501 Mon Sep 17 00:00:00 2001 From: haseeb <184114777+haseebsyed12@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:14:18 +0530 Subject: [PATCH] adding comments --- .../openstack/eventsources/eventsource-openstack-neutron.yaml | 4 ++++ workflows/openstack/sensors/sensor-neutron-deployment.yaml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/workflows/openstack/eventsources/eventsource-openstack-neutron.yaml b/workflows/openstack/eventsources/eventsource-openstack-neutron.yaml index a4c37a7c..70ab2f5d 100644 --- a/workflows/openstack/eventsources/eventsource-openstack-neutron.yaml +++ b/workflows/openstack/eventsources/eventsource-openstack-neutron.yaml @@ -6,15 +6,19 @@ metadata: spec: template: serviceAccountName: openstack-events + # Kubernetes resource event sources resource: neutron-deployment: + # monitor deployment resources under openstack namespace namespace: openstack resource: deployments group: apps version: v1 + # Event types to listen for (e.g., ADD, UPDATE, DELETE). Here we want only when deployment is created. eventTypes: - ADD filter: + # filter based these labels to match neutron-server deployment labels: - key: application value: neutron diff --git a/workflows/openstack/sensors/sensor-neutron-deployment.yaml b/workflows/openstack/sensors/sensor-neutron-deployment.yaml index 8ed94d54..bee6345e 100644 --- a/workflows/openstack/sensors/sensor-neutron-deployment.yaml +++ b/workflows/openstack/sensors/sensor-neutron-deployment.yaml @@ -7,10 +7,12 @@ metadata: spec: template: serviceAccountName: openstack-events + # events the Sensor listens for dependencies: - eventName: neutron-deployment eventSourceName: openstack-neutron name: openstack-neutron-server-deployment + # actions executed when dependencies are satisfied (StandardK8STrigger designed to create or update a generic Kubernetes resource.) triggers: - template: name: create-provisioning-network @@ -19,7 +21,7 @@ spec: source: resource: apiVersion: batch/v1 - kind: Job + kind: Job # Resource type to be created metadata: generateName: create-provision-network spec: