[jboss-jira] [JBoss JIRA] (WFWIP-211) emptyDir.sizeLimit not propagated to Pod Spec

Jeff Mesnil (Jira) issues at jboss.org
Tue Oct 1 10:42:00 EDT 2019


    [ https://issues.jboss.org/browse/WFWIP-211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13791650#comment-13791650 ] 

Jeff Mesnil commented on WFWIP-211:
-----------------------------------

[~mchoma] the issue is *not* present when I test on Kubernetes with WildFly Operator.

The issue *is* present on OpenShift with EAP Operator.

I think this is an OpenShift issue that's not related to the EAP Operator.
If I create a simple pod with a memory limit of 5Mi, it seems it is not taken into account by OpenShift:

{code}
$ cat emptydir-test.yaml
apiVersion: v1
kind: Pod
metadata:
  name: emptydir-test-pod
spec:
  containers:
  - image: alpine
    imagePullPolicy: IfNotPresent
    name: myvolumes-container

    command: [    'sh', '-c', 'echo The Bench Container 1 is Running ; sleep 3600']

    volumeMounts:
    - mountPath: /demo
      name: demo-volume
  volumes:
  - name: demo-volume
    emptyDir:
      medium: Memory
      sizeLimit: 5Mi
$ oc apply -f emptydir-test.yaml
pod/emptydir-test-pod created
$ oc get -o yaml  pod emptydir-test-pod
...
volumes:
  - emptyDir:
      medium: Memory
    name: demo-volume
  - name: default-token-2qwn8
    secret:
      defaultMode: 420
      secretName: default-token-2qwn8
...
{code}

I suppose OpenShift does not accept limit for memory emptyDir (or has a default one) but I could not find a definitive answer from the doc.

I'd suggest we close this issue as this is not something that is related to the operator. Do you agree?



> emptyDir.sizeLimit not propagated to Pod Spec
> ---------------------------------------------
>
>                 Key: WFWIP-211
>                 URL: https://issues.jboss.org/browse/WFWIP-211
>             Project: WildFly WIP
>          Issue Type: Bug
>          Components: OpenShift
>            Reporter: Martin Choma
>            Assignee: Jeff Mesnil
>            Priority: Blocker
>              Labels: operator
>
> # {code:yaml}
> apiVersion: wildfly.org/v1alpha1
> kind: WildFlyServer
> metadata:
>   name: operator-empty-dir
>   namespace: mchoma
> spec:
>   applicationImage: 'registry.access.redhat.com/jboss-eap-7/eap72-openshift:1.1'
>   size: 1
>   storage:
>     emptyDir:
>       medium: Memory
>       sizeLimit: 1Mi
> {code}
> # wait until pod are started and look into pod yaml definition "1 Mi" is not there
> {code:yaml}
> ...
>  serviceAccount: default
>   serviceAccountName: default
>   subdomain: operator-empty-dir-headless
>   terminationGracePeriodSeconds: 30
>   volumes:
>     - emptyDir:
>         medium: Memory
>       name: operator-empty-dir-volume
>     - name: default-token-j2grg
>       secret:
>         defaultMode: 420
>         secretName: default-token-j2grg
> status:
>   conditions:
> ...
> {code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list