devfile 0.0.13.pre.alpha1-arm64-darwin → 0.0.14.pre.alpha1-arm64-darwin

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: 3e655c5b49b095dd4cb57fec39ee88b65de58373c5807cfd4c690412b3f0ae76
4
- data.tar.gz: 86a3fd022d2a7457d7f7d90ab23683bf7135e7f7682b7a97119605b279bc04d8
3
+ metadata.gz: a51dbd46d989075807ea91333a1bcabca598d5bbfb6a6010c0aca3eb82a6cd83
4
+ data.tar.gz: 1f6dde67b986ef69691c6a577209332f6bd88095b50de0e6fdc1a8b1c776f81e
5
5
  SHA512:
6
- metadata.gz: 6eeb0faf58cb8adc029653c74e17257e15970fe7eb8e989341e91ba22335f80d182042443ec3add21e9712eccdbd1b45a235a507dc09cd3ff54be930ad625049
7
- data.tar.gz: cc1628f1a5458f23b88c8786acb27dcdce42a1d18b3cf841b0aca6c8d9cebe3ae64648ebac9372f345cc8fc52bc913746180195f8fdb5299aefa2f3599ddc291
6
+ metadata.gz: 1ca4a2dbdda67b2f53e0a2159564b99297ba2eeb24595a6ece5b45720881484ca826dbccedb20028b5aee0090806d8ff8e4707c6b0da4c21304b0cabb358efe9
7
+ data.tar.gz: dcde2fe0951b7654eed898eb81165d20f8b0e0c2b5e0339b642099ea13709b8795ac9f9dd75a42372e708422cca07e81bc21a333a54791ad7a359b92887b35fc
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: arm64-darwin
6
6
  authors:
7
7
  - GitLab