kind: DevWorkspaceTemplate
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: machine-exec
  annotations:
    controller.devfile.io/allow-import-from: '*'
spec:
  components:
    - name: che-machine-exec
      attributes:
        "app.kubernetes.io/name": che-terminal.eclipse.org
        "app.kubernetes.io/part-of": che.eclipse.org
        "app.kubernetes.io/component": terminal
      container:
        image: "quay.io/eclipse/che-machine-exec:7.20.0"
        command: ['/go/bin/che-machine-exec']
        args:
          - '--url'
          - '0.0.0.0:4444'
          - '--pod-selector'
          - controller.devfile.io/devworkspace_id=$(DEVWORKSPACE_ID)
        endpoints:
          - name: "che-mach-exec"
            exposure: public
            targetPort: 4444
            protocol: ws
            secure: true
            attributes:
              type: terminal
