apiVersion: apps/v1
kind: Deployment
metadata:
  name: calm-api
  labels:
    app: calm
    role: api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: calm
      role: api
  template:
    metadata:
      labels:
        app: calm
        role: api
    spec:
      containers:
      - name: calm-api
        image: brendanngoran/calmapi:1.0
        imagePullPolicy: Always
        ports:
        - containerPort: 80
        env:
        - name: DatabaseConnection
          value: CalmDbPostgreSqlK8s
        - name: ConnectionStrings__CalmDbPostgreSqlK8s
          value: host=calm-db;username=postgres;password=Password123
        - name: CorsOrigins__0
          value: http://localhost:4200
        - name: CorsOrigins__1
          value: http://192.168.99.100:4200
        - name: CorsOrigins__2
          value: http://calm-client.azurewebsites.net
        - name: CorsOrigins__3
          value: https://calm-client.azurewebsites.net
        - name: CorsOrigins__4
          value: http://calm.2002.revaturelabs.com
        - name: CorsOrigins__5
          value: https://calm.2002.revaturelabs.com
        - name: CorsOrigins__6
          value: http://afe294f2047fb4008a06b49b3774259e-1696975683.us-east-2.elb.amazonaws.com
        - name: UseHttpsRedirection
          value: 'false'