Search in sources :

Example 1 with VolumeType

use of org.eclipse.jkube.kit.config.resource.VolumeType in project jkube by eclipse.

the class PodTemplateHandler method getVolumes.

private List<Volume> getVolumes(ResourceConfig config) {
    List<VolumeConfig> volumeConfigs = config.getVolumes();
    List<Volume> ret = new ArrayList<>();
    if (volumeConfigs != null) {
        for (VolumeConfig volumeConfig : volumeConfigs) {
            VolumeType type = VolumeType.typeFor(volumeConfig.getType());
            if (type != null) {
                ret.add(type.fromConfig(volumeConfig));
            }
        }
    }
    return ret;
}
Also used : VolumeType(org.eclipse.jkube.kit.config.resource.VolumeType) Volume(io.fabric8.kubernetes.api.model.Volume) ArrayList(java.util.ArrayList) VolumeConfig(org.eclipse.jkube.kit.config.resource.VolumeConfig)

Aggregations

Volume (io.fabric8.kubernetes.api.model.Volume)1 ArrayList (java.util.ArrayList)1 VolumeConfig (org.eclipse.jkube.kit.config.resource.VolumeConfig)1 VolumeType (org.eclipse.jkube.kit.config.resource.VolumeType)1