Commit 5f90be80 authored by Sergio Gonzalez Diaz's avatar Sergio Gonzalez Diaz
Browse files

Test influxdb secret

parent fbb3adeb
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -18,15 +18,18 @@ spec:
        image: influxdb:1.8
        ports:
        - containerPort: 8086
        env:
        - name: INFLUXDB_DB
          value: "monitoring"
        - name: INFLUXDB_ADMIN_USER
          value: "teraflow"
        - name: INFLUXDB_ADMIN_PASSWORD
          value: "teraflow"
        - name: INFLUXDB_HTTP_AUTH_ENABLED
          value: "True"
        envFrom:
          - secretRef:
              name: influxdb-secrets
        # env:
        # - name: INFLUXDB_DB
        #   value: "monitoring"
        # - name: INFLUXDB_ADMIN_USER
        #   value: "teraflow"
        # - name: INFLUXDB_ADMIN_PASSWORD
        #   value: "teraflow"
        # - name: INFLUXDB_HTTP_AUTH_ENABLED
        #   value: "True"
        readinessProbe:
          exec:
            command: ["curl", "-XGET", "localhost:8086/health"]
+8 −1
Original line number Diff line number Diff line
@@ -39,10 +39,17 @@ build influx:
    # # - kubectl get all
    # - curl -XGET "10.97.74.29:8086/health" 
    # # - kubectl delete -f "manifests/influx.yaml"
    - kubectl create secret generic influxdb-secrets --from-literal=INFLUXDB_DB=monitoring --from-literal=INFLUXDB_ADMIN_USER=teraflow --from-literal=INFLUXDB_ADMIN_PASSWORD=teraflow --from-literal=INFLUXDB_HTTP_AUTH_ENABLED=True
    - kubectl describe secret influxdb-secrets
    - kubectl delete -f "manifests/monitoring.yaml"
    - sleep 15
    - kubectl get all
    - kubectl apply -f "manifests/monitoring.yaml"
    - sleep 60
    - kubectl get all
    - cd ./src/monitoring/service
    - docker build -t "test-influx" ./
    - docker run --name test-influx --rm test-influx
    - docker stop test-influx
    - docker rmi test-influx

# test if the Docker image can be pulled from the gitlab registry