Adding new observability fixes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# sientia-dataops-opc-gateway
|
||||
# sientia-dataops-opc-ingestor
|
||||
OPC gateway to manage Scouter pipelines
|
||||
|
||||
## Local tests
|
||||
|
||||
@@ -210,19 +210,29 @@ class Ingestor:
|
||||
self.ingestor_manager.declare_active()
|
||||
|
||||
self.logger.info("Polling for slot updates...")
|
||||
# Get active ingestors
|
||||
# Get active ingestors[
|
||||
|
||||
ingestors = self.ingestor_manager.get_active_ingestors()
|
||||
self.logger.debug(f"Active ingestors: {ingestors}")
|
||||
number_of_ingestors = len(ingestors)
|
||||
self.logger.debug(f"Number of ingestors: {number_of_ingestors}")
|
||||
number_of_leases = self.ingestor_manager.get_number_of_leases()
|
||||
self.logger.debug(f"Number of leases: {number_of_leases}")
|
||||
number_of_slots = self.ingestor_manager.get_number_of_slots()
|
||||
self.logger.debug(f"Number of slots: {number_of_slots}")
|
||||
|
||||
# Handle no slots
|
||||
self.logger.debug("Managing no slots...")
|
||||
self.manage_no_slots(number_of_slots)
|
||||
|
||||
available_slots = number_of_slots - number_of_leases
|
||||
self.logger.debug(f"Available slots: {available_slots}")
|
||||
lacking_ingestors = number_of_slots - number_of_ingestors
|
||||
self.logger.debug(f"Lacking ingestors: {lacking_ingestors}")
|
||||
slot_diff = len(self.ingestor_manager.managed_tags) - 1
|
||||
self.logger.debug(f"Slot diff: {slot_diff}")
|
||||
|
||||
self.logger.debug("Managing leases...")
|
||||
self.manage_leases(available_slots, lacking_ingestors, slot_diff)
|
||||
|
||||
self.logger.debug(
|
||||
@@ -237,7 +247,9 @@ class Ingestor:
|
||||
self.logger.info("No slots acquired in this loop")
|
||||
|
||||
# Update opc servers
|
||||
self.logger.debug("Updating slot config...")
|
||||
self.ingestor_manager.update_slot_config()
|
||||
|
||||
# Check OPC cycles
|
||||
self.logger.debug("Checking OPC servers integrity...")
|
||||
self.ingestor_manager.check_opc_servers_integrity()
|
||||
|
||||
15
values.yaml
15
values.yaml
@@ -19,7 +19,7 @@ imagePullSecrets:
|
||||
# This is to override the chart name.
|
||||
nameOverride: "sientia-opc-ingestor"
|
||||
fullnameOverride: "sientia-opc-ingestor"
|
||||
namespace: sientia-opc
|
||||
namespace: sientia
|
||||
|
||||
# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/
|
||||
serviceAccount:
|
||||
@@ -123,7 +123,7 @@ env:
|
||||
- name: GITHUB_REPO_URL
|
||||
value: "git@github.com:Aignosi/sientia-dataops-opc-ingestor.git"
|
||||
- name: GITHUB_BRANCH
|
||||
value: "SIENTIAPDE-988-criar-ingestor-opc"
|
||||
value: "main"
|
||||
- name: PYTHON_APP
|
||||
value: "ingestor.app"
|
||||
|
||||
@@ -154,9 +154,14 @@ env:
|
||||
|
||||
ssh:
|
||||
enabled: true
|
||||
secretName: git-ssh-key-temp
|
||||
secretName: git-ssh-key-sientia-opc-ingestor
|
||||
sshPath: /mnt/.ssh
|
||||
knownHostsPath: /mnt/known_hosts
|
||||
|
||||
# kubectl create secret docker-registry docker-hub-secret --namespace sientia-opc --docker-server=http://aignosi.azurecr.io --docker-username=aignosi --docker-password=5I5zpQ6sRaHqX1hD3dr+2mo647yO3FRc359/wu6gsP+ACRDRz5mp
|
||||
# helm upgrade --install sientia-dataops-opc-ingestor sientia/sientia-module -n sientia-opc --create-namespace -f ./values.yaml
|
||||
# kubectl create secret docker-registry docker-hub-secret --namespace sientia --docker-server=http://aignosi.azurecr.io --docker-username=aignosi --docker-password=5I5zpQ6sRaHqX1hD3dr+2mo647yO3FRc359/wu6gsP+ACRDRz5mp
|
||||
# helm upgrade --install sientia-opc-ingestor sientia/sientia-module -n sientia --create-namespace -f ./values.yaml --version 0.1.0-uat
|
||||
|
||||
# kubectl create secret generic git-ssh-key-sientia-opc-ingestor \
|
||||
# --namespace sientia \
|
||||
# --from-file=ssh-privatekey=git_key \
|
||||
# --type=kubernetes.io/ssh-auth
|
||||
Reference in New Issue
Block a user