apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend-deployment
  labels:
    app: frontend
spec:
  replicas: 3
  selector:
    matchLabels:
      app: frontend
  template:
    metadata:
      labels:
        app: frontend
    spec:
      containers:
        - name: frontend
          image: my-app/frontend:v1.2.0
          ports:
            - containerPort: 80
          env:
            - name: API_URL
              value: 'http://backend-service:8080'
          # SECURITY BUG: Running as root is dangerous
          securityContext:
            runAsUser: 0
            privileged: true
          resources:
            # PERFORMANCE BUG: No limits set
            requests:
              memory: '64Mi'
              cpu: '250m'
