# ConfigMap com arquivo nginx.conf
apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-config
  namespace: default
data:
  nginx.conf: |
    worker_processes 1;
    events {
      worker_connections 1024;
    }
    http {
      upstream backend {
        server backend-service:8080;
      }
      server {
        listen 80;
        location / {
          proxy_pass http://backend;
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
        }
        location /health {
          return 200 'ok';
        }
      }
    }