apiVersion: apps/v1
kind: Deployment
metadata:
  name: bookinfo-prd-ratings
  namespace: student25-bookinfo-prd
  labels:
    app: bookinfo-prd-ratings
spec:
  replicas: 1
  selector:
    matchLabels:
      app: bookinfo-prd-ratings
  template:
    metadata:
      labels:
        app: bookinfo-prd-ratings
    spec:
      containers:
      - name: bookinfo-prd-ratings
        image: ghcr.io/nattanunkorn9743/bookinfo-ratings:prd
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
          name: web-port
          protocol: TCP
        livenessProbe:
          httpGet:
            path: /health
            port: 8080
            scheme: HTTP
        readinessProbe:
          httpGet:
            path: /health
            port: 8080
            scheme: HTTP
        env:
        - name: SERVICE_VERSION
          value: v2
        - name: MONGO_DB_URL
          value: mongodb://bookinfo-prd-ratings-mongodb:27017/ratings
      imagePullSecrets:
      - name: registry-bookinfo