# This creates the website-controller pod, not the final custom website object

apiVersion: apps/v1
kind: Deployment
metadata:
  name: website-controller
  namespace: chp18-set1812
  labels:
    type: website-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: website-controller # match spec.template.metadata.labels
  template:
    metadata:
      labels:
        app: website-controller
        type: website-controller
    spec:
      serviceAccountName: website-controller

      containers:
      - name: main
        image: georgebaptista/website-controller:v1.1
        imagePullPolicy: Always
        securityContext:
          allowPrivilegeEscalation: false
          privileged: false
          runAsNonRoot: true
          runAsUser: 1001
        resources:
          requests:
            memory: "100Mi"
          limits:
            memory: "200Mi"
      - name: proxy
        image: luksa/kubectl-proxy:1.6.2
        imagePullPolicy: Always
        securityContext:
          allowPrivilegeEscalation: false
          privileged: false
          runAsNonRoot: true
          runAsUser: 1000
        resources:
          requests:
            memory: "100Mi"
          limits:
            memory: "200Mi"
