apiVersion: apps/v1
kind: Deployment
metadata:
  name: devbakkie-deployment
  labels:
    app: devbakkie
spec:
  replicas: 1
  selector:
    matchLabels:
      app: devbakkie
  template:
    metadata:
      labels:
        app: devbakkie
    spec:
      volumes: 
       - name: devbakkie-data
         persistentVolumeClaim:
          claimName: devbakkie-data
       - name: devbakkie-config
         persistentVolumeClaim:
          claimName: devbakkie-config  
      containers:
      - name: devbakkie
        image: rikblog/devbakkie:{{BUILD_NUMBER}}
        imagePullPolicy: Always
        ports:
        - containerPort: 80
        volumeMounts:
        - name: devbakkie-config
          mountPath: /tmp
        - name: devbakkie-data
          mountPath: /var/www/html
        env:
        - name: MY_NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: MY_POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: MY_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: MY_POD_SERVICE_ACCOUNT
          valueFrom:
            fieldRef:
              fieldPath: spec.serviceAccountName
