def _make_volumes(self, app_spec):
     if self._use_in_memory_emptydirs:
         empty_dir_volume_source = EmptyDirVolumeSource(medium="Memory")
     else:
         empty_dir_volume_source = EmptyDirVolumeSource()
     volumes = [
         Volume(name="{}-secret".format(app_spec.name), emptyDir=empty_dir_volume_source),
         Volume(name="{}-config".format(self.SECRETS_INIT_CONTAINER_NAME),
                configMap=ConfigMapVolumeSource(name=self.SECRETS_INIT_CONTAINER_NAME, optional=True)),
     ]
     return volumes
Exemple #2
0
 def _make_volumes(self, app_spec):
     volumes = []
     volumes.append(
         Volume(name="{}-config".format(app_spec.name),
                configMap=ConfigMapVolumeSource(name=app_spec.name,
                                                optional=True)))
     if self._use_in_memory_emptydirs:
         empty_dir_volume_source = EmptyDirVolumeSource(medium="Memory")
     else:
         empty_dir_volume_source = EmptyDirVolumeSource()
     volumes.append(Volume(name="tmp", emptyDir=empty_dir_volume_source))
     return volumes