apiVersion: apps/v1
kind: Deployment
metadata:
  name: notes-api
  labels:
    app: notes
    role: api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: notes
      role: api
  template:
    metadata:
      labels:
        app: notes
        role: api
    spec:
      containers:
      - name: notes-api
        image: nicholasescalona/2002-notes-api:1.0
        imagePullPolicy: Always
        ports:
        - containerPort: 80
        env:
        - name: DatabaseConnection
          value: NotesDbPostgreSqlK8s
        - name: ConnectionStrings__NotesDbPostgreSqlK8s
          value: Host=notes-db;Username=postgres;Password=Pass@word
        - name: CorsOrigins__0
          value: http://localhost:4200
        - name: CorsOrigins__1
          value: http://192.168.99.100:4200
        - name: CorsOrigins__2
          value: http://2002-ng-notes-client.azurewebsites.net
        - name: CorsOrigins__3
          value: https://2002-ng-notes-client.azurewebsites.net
        - name: CorsOrigins__4
          value: http://2002-ng-notes-client-docker.azurewebsites.net
        - name: CorsOrigins__5
          value: https://2002-ng-notes-client-docker.azurewebsites.net
        - name: CorsOrigins__6
          value: http://a219561f758a948d793acb07ca69013c-358843724.us-east-2.elb.amazonaws.com
        - name: CorsOrigins__7
          value: http://notes.2002.revaturelabs.com
        - name: CorsOrigins__8
          value: https://notes.2002.revaturelabs.com
        - name: UseHttpsRedirection
          value: 'false'
