apiVersion: apps/v1
kind: Deployment
metadata:
  name: crd-server
  labels:
    app: crd-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: crd-server
  template:
    metadata:
      labels:
        app: crd-server
    spec:
      containers:
      - name: server
        image: packtworkshops/the-kubernetes-workshop:crd
        env:
        - name: namespaceToWatch
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: podName
          valueFrom:
            fieldRef:
              fieldPath: metadata.name  
        imagePullPolicy: Always
