apiVersion: apps/v1
kind: Deployment
metadata:
  name: gateway-svc
  namespace: dev
spec:
  selector:
    matchLabels:
      app: gateway-svc
      environment: dev
      role: gateway
      tier: frontend
  replicas: 1
  minReadySeconds: 5
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  template:
    metadata:
      labels:
        app: gateway-svc
        environment: dev
        role: gateway
        tier: frontend
    spec:
      containers:
        - name: gateway-service
          image: nginx
          resources:
            requests:
              cpu: 100m
              memory: 100Mi
          ports:
            - containerPort: 80
          readinessProbe:
            tcpSocket:
              port: 80
            initialDelaySeconds: 5
            periodSeconds: 10
          # securityContext:
          #   # runAsUser: 1000
          #   # runAsNonRoot: true
          #   privileged: false
          #   allowPrivilegeEscalation: false
          #   readOnlyRootFilesystem: true
