apiVersion: apps/v1
kind: Deployment
metadata:
  # use this yaml to deploy the kubeturbo pod 
  # Provide a value for the deploy/pod name: and update namespace if needed
  name: kubeturbo
  namespace: turbo
spec:
  replicas: 1
  selector:
     matchLabels:
       app.kubernetes.io/name: kubeturbo
  template:
    metadata:
      annotations:
        kubeturbo.io/monitored: "false"
      labels:
        app.kubernetes.io/name: kubeturbo
    spec:
      # Update serviceAccount if needed
      serviceAccountName: turbo-user
      containers:
      - name: kubeturbo
        # Replace the image with desired version:6.4.4 or latest
        image: turbonomic/kubeturbo:8.0.0
        args:
          - --turboconfig=/etc/kubeturbo/turbo.config
          - --v=2
          # Comment out the following two args if running in k8s 1.10 or older, or
          # change to https=false and port=10255 if unsecure kubelet read only is configured
          - --kubelet-https=true
          - --kubelet-port=10250
          # Uncomment to stitch using IP, or if using Openstack, Hyper-V/VMM
          #- --stitch-uuid=false
        volumeMounts:
          # volume will be created, any name will work and must match below
          - name: turbo-volume
            mountPath: /etc/kubeturbo
            readOnly: true
          - name: turbonomic-credentials-volume
            mountPath: /etc/turbonomic-credentials
            readOnly: true
          - name: varlog
            mountPath: /var/log
      volumes:
      - name: turbo-volume
        configMap:
         # Update configMap name if needed
          name: turbo-config
      - name: turbonomic-credentials-volume
        secret:
          defaultMode: 420
          optional: true
          # Update secret name if needed
          secretName: turbonomic-credentials
      - name: varlog
        emptyDir: {}
      restartPolicy: Always
