﻿# This Deployment manifest defines:
# - single-replica deployment of the container image, with label "app: dotnet-guestbook-frontend"
# - Pod exposes port 8080
# - specify PORT environment variable to the container process
# Syntax reference https://kubernetes.io/docs/concepts/configuration/overview/
apiVersion: apps/v1
kind: Deployment
metadata:
  name: dotnet-guestbook-frontend
  labels:
    app: dotnet-guestbook
    tier: frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dotnet-guestbook
      tier: frontend
  template:
    metadata:
      labels:
        app: dotnet-guestbook
        tier: frontend
    spec:
      containers:
      - name: frontend
        image: dotnet-guestbook-frontend
        ports:
        - name: http-server
          containerPort: 8080
        - name: debug
          containerPort: 9229
        env:
        - name: PORT
          value: "8080"
        - name: GUESTBOOK_API_ADDR
          value: dotnet-guestbook-backend
