schemaVersion: 2.1.0
metadata:
  name: python-hello-world
  namespace: nickboldt-dev
attributes:
  controller.devfile.io/devworkspace-config:
    name: devworkspace-config
    namespace: crw
  controller.devfile.io/storage-type: common
projects:
  - git:
      remotes:
        origin: 'https://github.com/devspaces-samples/python-hello-world.git'
    name: python-hello-world
components:
  - attributes:
      che-code.eclipse.org/contribute-cpuLimit: true
      che-code.eclipse.org/contribute-cpuRequest: true
      che-code.eclipse.org/contribute-endpoint/che-code: 3100
      che-code.eclipse.org/contribute-endpoint/code-redirect-1: 13131
      che-code.eclipse.org/contribute-endpoint/code-redirect-2: 13132
      che-code.eclipse.org/contribute-endpoint/code-redirect-3: 13133
      che-code.eclipse.org/contribute-entry-point: true
      che-code.eclipse.org/contribute-memoryLimit: true
      che-code.eclipse.org/contribute-memoryRequest: true
      che-code.eclipse.org/contribute-volume-mount/checode: /checode
      che-code.eclipse.org/contributed-container: python
      che-code.eclipse.org/original-memoryLimit: 2G
    container:
      command:
        - /checode/entrypoint-volume.sh
      cpuLimit: 500m
      cpuRequest: 30m
      endpoints:
        - attributes:
            contributed-by: che-code.eclipse.org
            cookiesAuthEnabled: true
            discoverable: false
            type: main
            urlRewriteSupported: true
          exposure: public
          name: che-code
          path: '?tkn=eclipse-che'
          protocol: https
          secure: false
          targetPort: 3100
        - attributes:
            contributed-by: che-code.eclipse.org
            discoverable: false
            urlRewriteSupported: true
          exposure: public
          name: code-redirect-1
          protocol: http
          targetPort: 13131
        - attributes:
            contributed-by: che-code.eclipse.org
            discoverable: false
            urlRewriteSupported: true
          exposure: public
          name: code-redirect-2
          protocol: http
          targetPort: 13132
        - attributes:
            contributed-by: che-code.eclipse.org
            discoverable: false
            urlRewriteSupported: true
          exposure: public
          name: code-redirect-3
          protocol: http
          targetPort: 13133
      env:
        - name: CHE_DASHBOARD_URL
          value: 'https://devspaces.apps.sandbox.x8i5.p1.openshiftapps.com'
        - name: CHE_PLUGIN_REGISTRY_URL
          value: 'https://devspaces.apps.sandbox.x8i5.p1.openshiftapps.com/plugin-registry/v3'
        - name: CHE_PLUGIN_REGISTRY_INTERNAL_URL
          value: 'http://plugin-registry.crw.svc:8080/v3'
        - name: OPENVSX_REGISTRY_URL
          value: ''
      image: 'registry.redhat.io/devspaces/udi-rhel8:3.4'
      memoryLimit: 3.07G
      memoryRequest: 256Mi
      mountSources: true
      sourceMapping: /projects
      volumeMounts:
        - name: venv
          path: /home/user/.venv
        - name: checode
          path: /checode
    name: python
  - name: venv
    volume:
      size: 1G
commands:
  - exec:
      commandLine: python -m venv .venv && . .venv/bin/activate && python hello-world.py
      component: python
      group:
        kind: run
      label: Run the application
      workingDir: '${PROJECTS_ROOT}/python-hello-world'
    id: run
