apiVersion: apps/v1
kind: Deployment
metadata:
  name: flink-zeppelin
spec:
  replicas: 1
  selector:
    matchLabels:
      app: flink
      component: zeppelin
  template:
    metadata:
      labels:
        app: flink
        component: zeppelin
    spec:
      serviceAccountName: zep-flink-eks-kt-svcacct
      # the below is needed to give the container access
      # to the service token file
      securityContext:
        fsGroup: 65534
      containers:
      - name: zeppelin
        image: docker.io/kthyagar/ktflinkzep
        env:
        - name: ZEPPELIN_HOME
          value: "/zeppelin"
        - name: ZEPPELIN_RUN_MODE
          value: local
        - name: blahblah
          value: blahblah
        - name: blahblah
          value: blahblah
        ports:
        - name: http
          containerPort: 8080
          hostPort: 8080
        - name: https
          containerPort: 8443
        - name: rpc
          containerPort: 12320
        volumeMounts:
          - mountPath: "/stuff"
            name: stuff
      volumes:
      - name: stuff
        persistentVolumeClaim:
          claimName: ebs-claim
      - name: flinkconfig
        configMap:
          # Note the following needs to be retrieved from kubectl get configmap
          name: zeppelin-flink-interpreter-config-dgdhtcgg95
          items:
          - key: flink-interpreter-setting.json
            path: interpreter-setting.json