kind: DevWorkspaceTemplate
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: web-terminal
spec:
  components:
    - name: web-terminal
      container:
        image: "${RELATED_IMAGE_plugin_redhat_developer_web_terminal_4_5_0}"
        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",
                  "--use-tls"]
        endpoints:
          - name: web-terminal
            targetPort: 4444
            secure: true
            exposure: internal
            protocol: http
            attributes:
              type: main
        mountSources: false
        env:
          - name: USE_BEARER_TOKEN
            value: "true"
