From c65c016b915f770c78da579474cae81448a144ef Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Mon, 28 Apr 2025 08:06:44 -0300 Subject: [PATCH] SIENTIAPDE-1017 Add container ports to deployment and update service configuration --- helm/templates/deployment.yaml | 4 ++++ helm/templates/service.yaml | 19 ++++++++++--------- ingestor/managers/ingestor_manager.py | 2 ++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 76db92e..a35f2b6 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -40,6 +40,10 @@ spec: {{- end }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP env: {{- toYaml .Values.env | nindent 12 }} {{- with .Values.livenessProbe }} diff --git a/helm/templates/service.yaml b/helm/templates/service.yaml index 0fa843e..7859559 100644 --- a/helm/templates/service.yaml +++ b/helm/templates/service.yaml @@ -1,14 +1,15 @@ -{{- if .Values.service.enabled }} apiVersion: v1 kind: Service metadata: - name: "{{ .Values.nameOverride }}-service" - namespace: "{{ .Values.namespace }}" + name: {{ include "sientia-module.fullname" . }} + labels: + {{- include "sientia-module.labels" . | nindent 4 }} spec: - selector: - app: "{{ .Values.nameOverride }}" + type: {{ .Values.service.type }} ports: - - port: {{ .Values.service.port | int }} - targetPort: {{ .Values.service.targetPort | int }} - type: "{{ .Values.service.type }}" -{{- end }} + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "sientia-module.selectorLabels" . | nindent 4 }} diff --git a/ingestor/managers/ingestor_manager.py b/ingestor/managers/ingestor_manager.py index ff2a5d9..edd62ea 100644 --- a/ingestor/managers/ingestor_manager.py +++ b/ingestor/managers/ingestor_manager.py @@ -45,6 +45,8 @@ class IngestorManager(): """ try: + self.logger.info( + f"Initializing OpcManager at {server_config['url']}") manager = OpcManager( server_config['name'], server_config['url'], data_manager, logger, server_config['server_uri'], server_config.get('cert_path'), server_config.get(