Skip to content

volumeMounts is not working for Job resource. #385

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

Closed
supsupsap opened this issue Mar 29, 2024 · 2 comments
Closed

volumeMounts is not working for Job resource. #385

supsupsap opened this issue Mar 29, 2024 · 2 comments
Labels

Comments

@supsupsap
Copy link

supsupsap commented Mar 29, 2024

Affected Stackable version

23.11.0

Affected Apache Spark-on-Kubernetes version

spark-k8s:3.5.0

Current and expected behavior

I have created a simple configMap and am trying to provide it as a volume to the containers in the job

volumes:
    - name: ivy-config
      configMap:
        name: ivy-config

driver:
  config:
    volumeMounts:
      - name: ivy-config
        mountPath: /ivy/
        readOnly: true
    
executor:  
  config:  
    volumeMounts:
      - name: ivy-config
        mountPath: /ivy/
        readOnly: true

job:  
  config:  
    volumeMounts:
      - name: ivy-config
        mountPath: /ivy/
        readOnly: true

In driver and executors containers its mounted as expected. But not in Job container.
So I cant pass modified ivy settings to spark.

Possible solution

No response

Additional context

No response

Environment

No response

Would you like to work on fixing this bug?

None

@Jimvin
Copy link
Member

Jimvin commented Mar 29, 2024

Hello,
This is a known issue (#342) which has been fixed in our latest release 24.03. If you need this to work on 23.11 you can use podOverrides to add the volumes to the Spark job container. You'll want to check I've got the indentation right, but your volume/mount should look something like this:

spec:
  job:
    podOverrides:
      spec:
        volumes:
        - name: ivy-config
          configMap:
            name: ivy-config
        containers:
        - name: spark-submit
          volumeMounts:
          - name: ivy-config
            mountPath: /ivy/
            readOnly: true

@supsupsap
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants