apiVersion: v1
kind: Pod
metadata:
  annotations:
    akey1: aval1
  labels:
    lkey1: lvalue1
  name: az-example
  namespace: az-team
spec:
  containers:
  - env:
    - name: AZ_CLUSTER
      value: mycluster
    - name: AZ_CONF_VERSION
      value: 0.0.3
    - name: envKey
      value: envValue
    image: path/azkaban-base-image:0.0.5
    imagePullPolicy: IfNotPresent
    livenessProbe:
      exec:
        command:
        - cat
        - /tmp/liveProbe
      initialDelaySeconds: 5
      periodSeconds: 5
    name: az-flow-container
    readinessProbe:
      exec:
        command:
        - cat
        - /tmp/readyProbe
      initialDelaySeconds: 5
      periodSeconds: 5
    resources:
      limits:
        cpu: 500m
        memory: 500Mi
      requests:
        cpu: 500m
        memory: 500Mi
    volumeMounts:
    - mountPath: azBasePath/plugins/jobtypes/spark
      name: jobtype-volume-spark
    - mountPath: /var/run/nscd/socket
      name: nscd-socket
      readOnly: true
    - mountPath: /var/azkaban/private/conf
      name: azkaban-private-properties
    - mountPath: /var/run/kubelet
      name: kubelet
  initContainers:
  - env:
    - name: AZ_CLUSTER
      value: mycluster
    - name: JOBTYPE_MOUNT_PATH
      value: /data/jobtypes/spark
    image: path/spark-jobtype:0.0.5
    imagePullPolicy: IfNotPresent
    name: jobtype-init-spark
    volumeMounts:
    - mountPath: /data/jobtypes/spark
      name: jobtype-volume-spark
  - command:
    - chown
    - -R
    - '1000'
    - /var/run/kubelet/
    image: path/my-image:0.0.5
    name: chown-kubelet
    securityContext:
      runAsUser: 0
    volumeMounts:
    - mountPath: /var/run/kubelet
      name: kubelet
  restartPolicy: Never
  volumes:
  - emptyDir: {}
    name: jobtype-volume-spark
  - hostPath:
      type: Socket
      path: /var/run/nscd/socket
    name: nscd-socket
  - name: azkaban-private-properties
    secret:
      defaultMode: 256
      secretName: azkaban-private-properties
  - hostPath:
      type: Directory
      path: /export/content/lid/apps/kubelet/i002/var
    name: kubelet
