Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-volume ephemeral attribute in devfile #18271

Closed
mshaposhnik opened this issue Nov 3, 2020 · 1 comment
Closed

Per-volume ephemeral attribute in devfile #18271

mshaposhnik opened this issue Nov 3, 2020 · 1 comment
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P1 Has a major impact to usage or development of the system.

Comments

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Nov 3, 2020

Is your task related to a problem? Please describe.

Che-plugins allow to set ephemeral mode for container volumes described in meta.yaml.
To share such a volume with some other component, it is need to be possible to set ephemeral in the target component volume definition as well, since the same volume cannot be bound in ephemeral and persistent mode at the same time.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

#17102 (comment)
Expected devfile format:

devfile
apiVersion: 1.0.0
metadata:
  name: testJDKVersionKube
attributes:
  persistVolumes: 'true'
projects:
  - name: console-java-simple
    source:
      location: 'https://github.com/che-samples/console-java-simple.git'
      type: git
      branch: java1.11
components:
  - referenceContent: |
      apiVersion: v1
      kind: Pod
      metadata:
        name: ws
      spec:
        initContainers:
          - name: init-myservice
            image: adoptopenjdk/openjdk15-openj9
            command: ['sh', '-c', "echo copying jdk... && cp -R /opt/java/openjdk/ /tmp/jdk && echo done"]
    type: kubernetes
    volumes:
      - name: jdk
        containerPath: /tmp/jdk
        ephemeral: true
  - id: redhat/java11/latest
    preferences:
      java.configuration.runtimes: |-
        [
          {
            "name": "Open J9 15",
            "path": "/tmp/jdk/openjdk",
            "default": true
          }
        ]
    type: chePlugin
    volumes:
      - name: jdk
        containerPath: /tmp/jdk
  - mountSources: true
    memoryLimit: 512Mi
    type: dockerimage
    volumes:
      - name: jdk
        containerPath: /tmp/jdk
        ephemeral: true
      - name: m2
        containerPath: /home/user/.m2
    image: 'quay.io/eclipse/che-java11-maven:7.13.1'
    alias: maven
    env:
      - value: /tmp/jdk/openjdk
        name: JAVA_HOME
      - value: ''
        name: MAVEN_CONFIG
      - value: '-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom'
        name: JAVA_OPTS
      - value: '-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom -Duser.home=/home/user'
        name: MAVEN_OPTS
      - value: '-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom'
        name: JAVA_TOOL_OPTIONS
commands:
  - name: maven build
    actions:
      - workdir: '${CHE_PROJECTS_ROOT}/console-java-simple'
        type: exec
        command: mvn clean install
        component: maven
  - name: maven build and run
    actions:
      - workdir: '${CHE_PROJECTS_ROOT}/console-java-simple'
        type: exec
        command: mvn clean install && java -jar ./target/*.jar
        component: maven
@mshaposhnik mshaposhnik added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Nov 3, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 3, 2020
@skabashnyuk skabashnyuk added severity/P1 Has a major impact to usage or development of the system. area/che-server and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Nov 3, 2020
@skabashnyuk skabashnyuk added this to the 7.23 milestone Nov 3, 2020
@skabashnyuk skabashnyuk modified the milestones: 7.23, Backlog - Platform Nov 12, 2020
@che-bot
Copy link
Contributor

che-bot commented May 18, 2021

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 18, 2021
@che-bot che-bot closed this as completed Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server kind/task Internal things, technical debt, and to-do tasks to be performed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

3 participants