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

Init containers is not converted to V1 kubernetes models #180

Open
dimon222 opened this issue Dec 4, 2023 · 2 comments
Open

Init containers is not converted to V1 kubernetes models #180

dimon222 opened this issue Dec 4, 2023 · 2 comments

Comments

@dimon222
Copy link
Contributor

dimon222 commented Dec 4, 2023

Init containers currently only passes basic objects defined in task (dicts, lists, etc). It should be handling stuff in more complex way to accommodate conversion of lists of dicts to things like V1 VolumeMount and etc.

@siddu2020
Copy link

siddu2020 commented Dec 27, 2023

Can you explain why this is required ? are you looking at a specific use case ? I am more curious on context. I am thinking of contribution to this.

@dimon222
Copy link
Contributor Author

dimon222 commented Dec 27, 2023

Refer to these two code blocks:
Volume mount - https://github.com/ajbosco/dag-factory/blob/master/dagfactory/dagbuilder.py#L444-L448
Init containers - https://github.com/ajbosco/dag-factory/blob/master/dagfactory/dagbuilder.py#L502-L506
The problem is that volume mounts can be also not just on container level, but also on init containers level, and you can't just pass raw dict there that you got from reading yaml files (the underline casting will lead to incorrect serialized object that k8s api will not accept), it needs to match the V1VolumeMount class structure to be used properly. There might be other complex objects with similar problem that are missing conversion prior passing to constructors like V1Container.

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

No branches or pull requests

2 participants