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

Allow Pod Template to provide initContainers, Volumes, and Containers #157

Closed
wants to merge 2 commits into from
Closed

Allow Pod Template to provide initContainers, Volumes, and Containers #157

wants to merge 2 commits into from

Conversation

schancel
Copy link
Contributor

@schancel schancel commented Apr 2, 2019

Previously, NewNatsPodSpec would initialize it the spec from a deep
copy of the PodTemplate, if it was provided by the user. However, it then
overwrites initContainers, Volumes, and Containers with item lists that
are build at runtime.

This commit changes the behavior to append to the existing lists, enabling
InitContainers, Volumes, and Containers to be specified in the pod template.

Additionally, this adds a VolumeMounts item to the PodPolicy so that
volumes provided in the template, can be mounted into the nats container.

Step #1 of addressing #156

Previously, `NewNatsPodSpec` would initialize it the spec from a deep
copy of the PodTemplate, if it was provided by the user.  However, it then
overwrites initContainers, Volumes, and Containers with item lists that
are build at runtime.

This commit changes the behavior to append to the existing lists, enabling
InitContainers, Volumes, and Containers to be specified in the pod template.

Additionally, this adds a `VolumeMounts` item to the PodPolicy so that
volumes provided in the template, can be mounted into the nats container.
@wallyqs
Copy link
Member

wallyqs commented Apr 2, 2019

Merged including a couple of fixes (bbff797)

@wallyqs wallyqs closed this Apr 2, 2019
@schancel schancel deleted the template-fix branch April 2, 2019 16:38
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

Successfully merging this pull request may close these issues.

2 participants