devfile 0.0.13.pre.alpha1-x86_64-linux → 0.0.14.pre.alpha1-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/devfile +0 -0
  3. data/ext/volume.go +7 -6
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2828c04bd596361245d3c284bc14a54c665480503bee24306bd05c112a7eead5
4
- data.tar.gz: fbcc19449ed34019693d5ef30d4f5499cf36b90e6f0f96fd48439e234873cde3
3
+ metadata.gz: 383ba06875e6f3c5ffa91aff57a88957b18486ac4bc08e18503a7e23e2386c0c
4
+ data.tar.gz: 80a6afb162202a4717312ef2b561c21e906a2753db9e6d530762129e83814306
5
5
  SHA512:
6
- metadata.gz: bdb5fb6df7de30d29c351b584746ca0fd149054a43162d9c9cadae5fd0bb577f694c0fb72b3d19512889282af121d75b80e3ac94ec9a6e6e46febff7eb6c04b3
7
- data.tar.gz: '04308c3afdf61e819014e6d63e9e0460a7e6a402d9c9f271a79b54132aa27ea77ae17182aa9ad691cd08a01b5b1c25c6e7a2b3dcd3c3ed211263f6c6747035f1'
6
+ metadata.gz: 6d2f882ed4c62d2ed9f22a72e1d5d75cd6832fa847c4aad0059ff9a593fc7b8ac76df9f5f8c0fcb833053e5fc0fb53c9bbf111b706955f7a43cdc0dd186aa2b0
7
+ data.tar.gz: 523d788b7ce4dd99681a14bddd3789d1f854d27fc8ae7fb4cbe0a03ce01adacbae534e096431d73d19112530defc52c7b09983430821683dfaa83edfcbdc52ed
data/bin/devfile CHANGED
Binary file
data/ext/volume.go CHANGED
@@ -22,31 +22,32 @@ func (d Devfile) getVolumesAndVolumeMounts(containers []corev1.Container, initCo
22
22
  var volumes []corev1.Volume
23
23
  pvcNameToPvcOptions := map[string]pvcOptions{}
24
24
  for _, volumeComponent := range volumeComponents {
25
- volumeName := fmt.Sprintf("%s-%s", volumeNamePrefix, volumeComponent.Name)
25
+ volName := volumeComponent.Name
26
26
  if bool(*volumeComponent.Volume.Ephemeral) == true {
27
- emptyDir, err := getEmptyDir(volumeName, volumeComponent.Volume.Size)
27
+ emptyDir, err := getEmptyDir(volName, volumeComponent.Volume.Size)
28
28
  if err != nil {
29
29
  return nil, nil, err
30
30
  }
31
31
  volumes = append(volumes, emptyDir)
32
32
  } else {
33
- volumes = append(volumes, getPersistentVolumeClaim(volumeName, volumeName))
33
+ pvcName := fmt.Sprintf("%s-%s", volumeNamePrefix, volumeComponent.Name)
34
34
  pvcNameToPvcOptions[volumeComponent.Name] = pvcOptions{
35
- Name: volumeName,
35
+ Name: pvcName,
36
36
  Size: volumeComponent.Volume.Size,
37
37
  }
38
+ volumes = append(volumes, getPersistentVolumeClaim(volName, pvcName))
38
39
  }
39
40
  // containerNameToMountPaths is a map of the Devfile container name to their Devfile Volume Mount Paths for a given Volume Name
40
41
  containerNameToMountPaths := make(map[string][]string)
41
42
  for _, containerComp := range containerComponents {
42
43
  for _, volumeMount := range containerComp.Container.VolumeMounts {
43
- if volumeComponent.Name == volumeMount.Name {
44
+ if volName == volumeMount.Name {
44
45
  containerNameToMountPaths[containerComp.Name] = append(containerNameToMountPaths[containerComp.Name], generator.GetVolumeMountPath(volumeMount))
45
46
  }
46
47
  }
47
48
  }
48
49
 
49
- addVolumeMountToContainers(containers, initContainers, volumeName, containerNameToMountPaths)
50
+ addVolumeMountToContainers(containers, initContainers, volumeComponent.Name, containerNameToMountPaths)
50
51
  }
51
52
 
52
53
  return volumes, pvcNameToPvcOptions, nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devfile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13.pre.alpha1
4
+ version: 0.0.14.pre.alpha1
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - GitLab