Commit 8be9ef71 authored by Sergio Gonzalez Diaz's avatar Sergio Gonzalez Diaz
Browse files

Fix main monitoring

parent 3a4ed517
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -82,3 +82,21 @@ spec:
    port: 8086
    targetPort: 8086
---
apiVersion: v1
kind: Service
metadata:
  name: monitoring-public
spec:
  type: NodePort
  selector:
    app: monitoring
  ports:
  - name: grpc
    protocol: TCP
    port: 7070
    targetPort: 7070
  - name: influxdb
    protocol: TCP
    port: 8086
    targetPort: 8086
---
 No newline at end of file
+4 −4
Original line number Diff line number Diff line
@@ -28,14 +28,14 @@ kubernetes test:
  script:
    # - kubectl version
    # - kubectl get all
    # - kubectl delete -f "manifests/monitoring.yaml"
    - kubectl delete -f "manifests/monitoring.yaml"
    # - sleep 15
    # - kubectl apply -f "manifests/monitoring.yaml"
    # - sleep 30
    # - kubectl get all
    - kubectl --namespace gitlab-ci describe pod monitoring-9df446bb5-6tmft
    - kubectl --namespace gitlab-ci logs monitoring-9df446bb5-6tmft influxdb
    - kubectl --namespace gitlab-ci logs monitoring-9df446bb5-6tmft server
    # - kubectl --namespace gitlab-ci describe pod monitoring-9df446bb5-6tmft
    # - kubectl --namespace gitlab-ci logs monitoring-9df446bb5-6tmft influxdb
    # - kubectl --namespace gitlab-ci logs monitoring-9df446bb5-6tmft server

# # test if the Docker image can be pulled from the gitlab registry
# test monitoring pull:
+5 −5
Original line number Diff line number Diff line
@@ -22,11 +22,11 @@ def signal_handler(signal, frame):
def main():
    global terminate, logger

    service_port = os.environ.get('DEVICESERVICE_SERVICE_PORT_GRPC', GRPC_SERVICE_PORT)
    max_workers  = os.environ.get('MAX_WORKERS',                     GRPC_MAX_WORKERS )
    grace_period = os.environ.get('GRACE_PERIOD',                    GRPC_GRACE_PERIOD)
    log_level    = os.environ.get('LOG_LEVEL',                       LOG_LEVEL        )
    metrics_port = os.environ.get('METRICS_PORT',                    METRICS_PORT     )
    service_port = GRPC_SERVICE_PORT
    max_workers  = GRPC_MAX_WORKERS
    grace_period = GRPC_GRACE_PERIOD
    log_level    = LOG_LEVEL
    metrics_port = METRICS_PORT

    logging.basicConfig(level=log_level)
    logger = logging.getLogger(__name__)