devfile 0.0.13.pre.alpha1 → 0.0.14.pre.alpha1

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: 794a08b4df806752813a0ab4df2561291220f1ffd1e52886688c2af7929b62ad
4
- data.tar.gz: 21afe7859698dc11d52a0e26ec3dc24fb51749ae1ab6d2a2fc2dde1e96ac41b4
3
+ metadata.gz: 52153772bb9dd4f96de48a6f0f66fb75f53f390c9c9c50c464061f77d39d9806
4
+ data.tar.gz: a3c7135482261fdb043c6c772b5c0410f0ad53e58e0f044339c48edc956814f3
5
5
  SHA512:
6
- metadata.gz: 63809486c1e80f8b5648a094409ffa2d47baa2e5837be47eb587634bb6a20e8cba49a3647faeda9a3add4082cc466955fec31a42941a36d40973d776eb2d9299
7
- data.tar.gz: de34040a781b618c4dfa222cf5518cb77d6104b82df762ecf8bec51b72c479fcfe6d0dd2be338e920d5e1de5b71f84a27a50f02da44ff3ec5037978d173f53e0
6
+ metadata.gz: 64091eac35fb3555bf8ef35cbd0d6bf8317696c8bb6fbd5502e5bda65581fbb2ae1609d2f0d2a22440a5a07b30ce0c20b371d6337484b6594073144bce3b598b
7
+ data.tar.gz: d95abf1569fb1bd487cbaad0f14c08f13de6a004dd7b143030d4625f0965286de930ee95c26eba4d00dcf3f37f5b6a3c2c993b680ccc7569fc31de8512ce89ea
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: ruby
6
6
  authors:
7
7
  - GitLab