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

proposal for multiple configmaps #112 #113

Closed
wants to merge 21 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions fiaas_deploy_daemon/deployer/kubernetes/deployment/deployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def delete(self, app_spec):

def _make_volumes(self, app_spec):
volumes = []
if app_spec.config_maps:
for config_map in app_spec.config_maps:
volumes.insert(0, Volume(name="{}-config".format(config_map),
configMap=ConfigMapVolumeSource(name=config_map, optional=True)))
volumes.append(Volume(name="{}-config".format(app_spec.name),
configMap=ConfigMapVolumeSource(name=app_spec.name, optional=True)))
if self._use_in_memory_emptydirs:
Expand Down Expand Up @@ -246,13 +250,17 @@ def _build_fiaas_env(config):


def _add_config_maps(app_spec):
"""
adds the configMaps to envFrom. Inserts user-defined configMaps first so the default configMap takes precedence in
case of key-collisions
"""
config_maps = [EnvFromSource(configMapRef=ConfigMapEnvSource(name=app_spec.name, optional=True))]
skogie marked this conversation as resolved.
Show resolved Hide resolved
if app_spec.config_maps:
for config_map in app_spec.config_maps:
config_maps.append(EnvFromSource(configMapRef=ConfigMapEnvSource(name=config_map, optional=True)))
return config_maps
config_maps.insert(0, EnvFromSource(configMapRef=ConfigMapEnvSource(name=config_map, optional=True)))
skogie marked this conversation as resolved.
Show resolved Hide resolved
return config_maps


def _build_global_env(global_env):
"""
global_env key/value are added as is and with the key prefix FIAAS_
Expand Down