apiVersion: apps/v1
kind: Deployment
metadata:
  name: real-estate-hub
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: real-estate-hub
  template:
    metadata:
      labels:
        app: real-estate-hub
    spec:
      containers:
        - image: docker.io/bigsidhu/real-estate-hub:598b1bfc87ec2aec826e2405b69bfd5ac40a62c6
          name: real-estate-hub
          imagePullPolicy: Always
          command: ["streamlit", "run", "app/main.py"]
          env:
            - name: GOOGLE_API_KEY
              valueFrom:
                secretKeyRef:
                  key: GOOGLE_API_KEY
                  name: google
                  optional: false
            - name: RAPID_API_KEY
              valueFrom:
                secretKeyRef:
                  key: RAPID_API_KEY
                  name: rapid-api
                  optional: false
            - name: ELASTIC_API_ID
              valueFrom:
                secretKeyRef:
                  key: ELASTIC_API_ID
                  name: es-keys
                  optional: false
            - name: ELASTIC_API_KEY
              valueFrom:
                secretKeyRef:
                  key: ELASTIC_API_KEY
                  name: es-keys
                  optional: false
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: 8501
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          ports:
            - containerPort: 8501
              name: 8501tcpport
      restartPolicy: Always
      dnsPolicy: Default
