apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: notes-app
    name: backend-notes-app
  name: backend-notes-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: notes-app
      name: backend-notes-app
  strategy: {}
  template:
    metadata:
      labels:
        app: notes-app
        name: backend-notes-app
    spec:
      containers:
        - image: vrlins001/backend-notes-app:latest
          name: backend-notes-app
          resources: {}
          ports:
            - containerPort: 8080
          env:
            - name: MONGO_INITDB_ROOT_USERNAME
              valueFrom:
                secretKeyRef:
                  name: db-notes-app-secrets
                  key: MONGO_INITDB_ROOT_USERNAME
            - name: MONGO_INITDB_ROOT_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: db-notes-app-secrets
                  key: MONGO_INITDB_ROOT_PASSWORD
            - name: MONGO_PORT
              value: "27017"
            - name: MONGO_HOST
              value: db
