apiVersion: v1
kind: Namespace
metadata:
  name: wifi-densepose
  labels:
    name: wifi-densepose
    app: wifi-densepose
    environment: production
    version: v1
  annotations:
    description: "WiFi-DensePose application namespace"
    contact: "devops@wifi-densepose.com"
    created-by: "kubernetes-deployment"
spec:
  finalizers:
    - kubernetes
---
apiVersion: v1
kind: ResourceQuota
metadata:
  name: wifi-densepose-quota
  namespace: wifi-densepose
spec:
  hard:
    requests.cpu: "8"
    requests.memory: 16Gi
    limits.cpu: "16"
    limits.memory: 32Gi
    persistentvolumeclaims: "10"
    pods: "20"
    services: "10"
    secrets: "20"
    configmaps: "20"
---
apiVersion: v1
kind: LimitRange
metadata:
  name: wifi-densepose-limits
  namespace: wifi-densepose
spec:
  limits:
  - default:
      cpu: "1"
      memory: "2Gi"
    defaultRequest:
      cpu: "100m"
      memory: "256Mi"
    type: Container
  - default:
      storage: "10Gi"
    type: PersistentVolumeClaim
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: wifi-densepose-network-policy
  namespace: wifi-densepose
spec:
  podSelector: {}
  policyTypes:
  - Ingress
  - Egress
  ingress:
  - from:
    - namespaceSelector:
        matchLabels:
          name: wifi-densepose
    - namespaceSelector:
        matchLabels:
          name: monitoring
    - namespaceSelector:
        matchLabels:
          name: ingress-nginx
  egress:
  - to: []
    ports:
    - protocol: TCP
      port: 53
    - protocol: UDP
      port: 53
  - to:
    - namespaceSelector:
        matchLabels:
          name: wifi-densepose
  - to: []
    ports:
    - protocol: TCP
      port: 443
    - protocol: TCP
      port: 80