apiVersion: apps/v1
kind: Deployment
metadata:
  name: king-rules
spec:
  selector:
    matchLabels:
      app: king-rules
  replicas: 1
  template:
    metadata:
      labels:
        app: king-rules
    spec:
      serviceAccountName: king-rules
      containers:
      - name: app
        image: jpedrob/king-rules:$TAG
        imagePullPolicy: Always
        env:
        # Required as this is not passed on to the container
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
