apiVersion: apps/v1
kind: Deployment
metadata:
  name: topology-inventory
  labels:
    app: topology-inventory
spec:
  replicas: 1
  selector:
    matchLabels:
      app: topology-inventory
  template:
    metadata:
      labels:
        app: topology-inventory
    spec:
      initContainers:
        - name: topology-inventory-mysql-init
          image: busybox
          command: [ 'sh', '-c', 'until nslookup topology-inventory-mysql; do echo waiting for topology-inventory-mysql; sleep 5; done;' ]
      containers:
        - name: topology-inventory
          image: s4intlaurent/topology-inventory-native:latest
          envFrom:
          - configMapRef:
              name: topology-inventory
          livenessProbe:
            httpGet:
              path: /q/health/ready
              port: 8080
            initialDelaySeconds: 30
            timeoutSeconds: 5
            periodSeconds: 3
          ports:
            - containerPort: 8080
