Skip to content

Commit

Permalink
Update to new lib-common VolumeSource structs
Browse files Browse the repository at this point in the history
  • Loading branch information
dprince committed Oct 25, 2024
1 parent af5e27b commit 74c04c5
Show file tree
Hide file tree
Showing 16 changed files with 2,435 additions and 6,858 deletions.
927 changes: 242 additions & 685 deletions api/bases/cinder.openstack.org_cinderapis.yaml

Large diffs are not rendered by default.

927 changes: 242 additions & 685 deletions api/bases/cinder.openstack.org_cinderbackups.yaml

Large diffs are not rendered by default.

927 changes: 242 additions & 685 deletions api/bases/cinder.openstack.org_cinders.yaml

Large diffs are not rendered by default.

927 changes: 242 additions & 685 deletions api/bases/cinder.openstack.org_cinderschedulers.yaml

Large diffs are not rendered by default.

927 changes: 242 additions & 685 deletions api/bases/cinder.openstack.org_cindervolumes.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20241014140317-e5c35d28f3af
github.com/openstack-k8s-operators/lib-common/modules/storage v0.4.1-0.20241014140317-e5c35d28f3af
github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241025164019-30baa23bf6f1
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
k8s.io/api v0.29.9
k8s.io/apimachinery v0.29.9
Expand Down
4 changes: 2 additions & 2 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20241014140317-e5c35d28f3af h1:MNNuYPfaXWf14lfsWGay3WjLjIIu9KN5+iHrLdCMQac=
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20241014140317-e5c35d28f3af/go.mod h1:EKfyFMU2brJYqR4M2Hwfo5ZLBQxAJXAYfHjpdqX6N5g=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.4.1-0.20241014140317-e5c35d28f3af h1:l8GXJhv4P/fy7Amz9XPEi8sn+hvxrQf1gICpmOaqOuE=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.4.1-0.20241014140317-e5c35d28f3af/go.mod h1:cGynoLGY9NfyIeWXI3zZ+hgZdHF3SUi8ht5ygZ8CmhI=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241025164019-30baa23bf6f1 h1:3ga7BSlbuXypDeuV6mpG1AvgxWLeYTKYzCb9J/UyU5c=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241025164019-30baa23bf6f1/go.mod h1:cGynoLGY9NfyIeWXI3zZ+hgZdHF3SUi8ht5ygZ8CmhI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/cinder_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const (
// DBPurgeDefaultSchedule - Default cron schedule for purging the DB
DBPurgeDefaultSchedule = "1 0 * * *"
// APITimeoutDefault - Default timeout in seconds for HAProxy, Apache, and RPCs
APITimeoutDefault = 60
APITimeoutDefault = 60
)

type CinderSpecBase struct {
Expand Down
927 changes: 242 additions & 685 deletions config/crd/bases/cinder.openstack.org_cinderapis.yaml

Large diffs are not rendered by default.

927 changes: 242 additions & 685 deletions config/crd/bases/cinder.openstack.org_cinderbackups.yaml

Large diffs are not rendered by default.

927 changes: 242 additions & 685 deletions config/crd/bases/cinder.openstack.org_cinders.yaml

Large diffs are not rendered by default.

927 changes: 242 additions & 685 deletions config/crd/bases/cinder.openstack.org_cinderschedulers.yaml

Large diffs are not rendered by default.

927 changes: 242 additions & 685 deletions config/crd/bases/cinder.openstack.org_cindervolumes.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/openstack-k8s-operators/infra-operator/apis v0.4.1-0.20241015064410-3d0bae9c028a
github.com/openstack-k8s-operators/keystone-operator/api v0.4.1-0.20241013092400-3f9337945472
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20241014140317-e5c35d28f3af
github.com/openstack-k8s-operators/lib-common/modules/storage v0.4.1-0.20241014140317-e5c35d28f3af
github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241025164019-30baa23bf6f1
github.com/openstack-k8s-operators/lib-common/modules/test v0.4.1-0.20241014140317-e5c35d28f3af
github.com/openstack-k8s-operators/mariadb-operator/api v0.4.1-0.20241015090956-b0954ab72dcd
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.2024101414
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20241014140317-e5c35d28f3af/go.mod h1:EKfyFMU2brJYqR4M2Hwfo5ZLBQxAJXAYfHjpdqX6N5g=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.4.1-0.20241014140317-e5c35d28f3af h1:fevDUHmqcnI4wDTKupKe/CcgVdgNpZXWkJx8u0/xEXs=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.4.1-0.20241014140317-e5c35d28f3af/go.mod h1:djfljx3jfHqywhY3oDvPg/GLKwiFVkds6v7P7/Yg+8g=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.4.1-0.20241014140317-e5c35d28f3af h1:l8GXJhv4P/fy7Amz9XPEi8sn+hvxrQf1gICpmOaqOuE=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.4.1-0.20241014140317-e5c35d28f3af/go.mod h1:cGynoLGY9NfyIeWXI3zZ+hgZdHF3SUi8ht5ygZ8CmhI=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241025164019-30baa23bf6f1 h1:3ga7BSlbuXypDeuV6mpG1AvgxWLeYTKYzCb9J/UyU5c=
github.com/openstack-k8s-operators/lib-common/modules/storage v0.5.1-0.20241025164019-30baa23bf6f1/go.mod h1:cGynoLGY9NfyIeWXI3zZ+hgZdHF3SUi8ht5ygZ8CmhI=
github.com/openstack-k8s-operators/lib-common/modules/test v0.4.1-0.20241014140317-e5c35d28f3af h1:u5yJ/rV9VBMjKIcsu16/3rhiPcBxZN2sPqxnZHoRrNc=
github.com/openstack-k8s-operators/lib-common/modules/test v0.4.1-0.20241014140317-e5c35d28f3af/go.mod h1:LV0jo5etIsGyINpmB37i4oWR8zU6ApIuh7fsqGGA41o=
github.com/openstack-k8s-operators/mariadb-operator/api v0.4.1-0.20241015090956-b0954ab72dcd h1:PqJByNFRxjnhcEMv9vrXX1wH4qOYOt+fSdGmOEkC5gA=
Expand Down
9 changes: 8 additions & 1 deletion pkg/cinder/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,14 @@ func GetVolumes(name string, storageSvc bool, extraVol []cinderv1beta1.CinderExt

for _, exv := range extraVol {
for _, vol := range exv.Propagate(svc) {
res = append(res, vol.Volumes...)
for _, v := range vol.Volumes {
volumeSource, _ := v.VolumeSource.ToCoreVolumeSource()
convertedVolume := corev1.Volume{
Name: v.Name,
VolumeSource: *volumeSource,
}
res = append(res, convertedVolume)
}
}
}
return res
Expand Down

0 comments on commit 74c04c5

Please sign in to comment.