Search in sources :

Example 1 with VolumeType

use of io.fabric8.maven.core.config.VolumeType in project fabric8-maven-plugin by fabric8io.

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(io.fabric8.maven.core.config.VolumeType) ArrayList(java.util.ArrayList) VolumeConfig(io.fabric8.maven.core.config.VolumeConfig)

Aggregations

VolumeConfig (io.fabric8.maven.core.config.VolumeConfig)1 VolumeType (io.fabric8.maven.core.config.VolumeType)1 ArrayList (java.util.ArrayList)1