kind: DevWorkspaceTemplate
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: web-terminal-dev
  annotations:
    controller.devfile.io/allow-import-from: '*'
spec:
  components:
    - name: web-terminal
      container:
        image: quay.io/eclipse/che-machine-exec:nightly
        mountSources: false
        command: ["/go/bin/che-machine-exec",
                  "--authenticated-user-id", "$(DEVWORKSPACE_CREATOR)",
                  "--idle-timeout", "$(DEVWORKSPACE_IDLE_TIMEOUT)",
                  "--pod-selector", "controller.devfile.io/devworkspace_id=$(DEVWORKSPACE_ID)",
                  "--use-bearer-token"]
        endpoints:
          - name: web-terminal
            targetPort: 4444
            secure: true
            exposure: public
            protocol: http
            attributes:
              type: main
        env:
          - name: USE_BEARER_TOKEN
            value: "true"
