apiVersion: apps/v1 kind: Deployment metadata: name: portal namespace: automatizase labels: app: portal environment: production spec: replicas: 1 # Alta disponibilidade selector: matchLabels: app: portal template: metadata: labels: app: portal spec: # Secret para pull de imagem do registry privado imagePullSecrets: - name: gitea-registry-secret containers: - name: nextjs image: git.automatizase.com.br/luis.erlacher/dashboard-automatizase:latest imagePullPolicy: Always ports: - containerPort: 3100 name: http protocol: TCP # Carregar variáveis de ambiente do Secret envFrom: - secretRef: name: portal-secrets # Resource limits e requests resources: requests: memory: "256Mi" cpu: "100m" limits: memory: "512Mi" cpu: "500m" # Liveness probe - verifica se container está vivo livenessProbe: httpGet: path: /api/health port: 3100 scheme: HTTP initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 successThreshold: 1 failureThreshold: 3 # Readiness probe - verifica se container está pronto para receber tráfego readinessProbe: httpGet: path: /api/health port: 3100 scheme: HTTP initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 3 successThreshold: 1 failureThreshold: 3 # Restart policy restartPolicy: Always