Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4658,7 +4658,7 @@ spec:
type: string
type: object
type:
default: split
default: single
enum:
- split
- single
Expand Down
4 changes: 4 additions & 0 deletions api/bases/core.openstack.org_openstackversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ spec:
availableServiceDefaults:
additionalProperties:
properties:
glanceLocationAPI:
type: string
glanceWsgi:
type: string
type: object
Expand Down Expand Up @@ -683,6 +685,8 @@ spec:
type: integer
serviceDefaults:
properties:
glanceLocationAPI:
type: string
glanceWsgi:
type: string
type: object
Expand Down
1 change: 1 addition & 0 deletions api/core/v1beta1/openstackversion_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ type ContainerTemplate struct {
// but are associated with a specific OpenStack release version
type ServiceDefaults struct {
GlanceWsgi *string `json:"glanceWsgi,omitempty"`
GlanceLocationAPI *string `json:"glanceLocationAPI,omitempty"`
}

// OpenStackVersionStatus defines the observed state of OpenStackVersion
Expand Down
5 changes: 5 additions & 0 deletions api/core/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,5 @@ replace k8s.io/code-generator => k8s.io/code-generator v0.31.14 //allow-merging
replace k8s.io/component-base => k8s.io/component-base v0.31.14 //allow-merging

replace github.com/cert-manager/cmctl/v2 => github.com/cert-manager/cmctl/v2 v2.1.2-0.20241127223932-88edb96860cf //allow-merging

replace github.com/openstack-k8s-operators/glance-operator/api => github.com/fmount/glance-operator/api v0.1.2-0.20260305205814-319db2e0e586
4 changes: 2 additions & 2 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ github.com/evanphx/json-patch v5.9.11+incompatible h1:ixHHqfcGvxhWkniF1tWxBHA0yb
github.com/evanphx/json-patch v5.9.11+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU=
github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM=
github.com/fmount/glance-operator/api v0.1.2-0.20260305205814-319db2e0e586 h1:JGoFeaOx2eHXnXSeE63wE+8RYfUcpBe/3G8+VCYPM8Y=
github.com/fmount/glance-operator/api v0.1.2-0.20260305205814-319db2e0e586/go.mod h1:4Y0Q6mnvhxYe4ZXhfr20NAZ23QOT5qsaU3R1E5tdd34=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
Expand Down Expand Up @@ -120,8 +122,6 @@ github.com/openstack-k8s-operators/cinder-operator/api v0.6.1-0.20260304071337-6
github.com/openstack-k8s-operators/cinder-operator/api v0.6.1-0.20260304071337-63312061d576/go.mod h1:Ta5iogB0ASRIz3tZBV5tmuWBkxKfLcCX/zm1sLLs4MM=
github.com/openstack-k8s-operators/designate-operator/api v0.6.1-0.20260302083231-563bef879f57 h1:vgIrNDgCARoTi/EvPG8U4DPt9YXeCbneJEAI1Yyi2KQ=
github.com/openstack-k8s-operators/designate-operator/api v0.6.1-0.20260302083231-563bef879f57/go.mod h1:mvJ6d6hH6vM9KH3Gs7Z7coAEaHe0oI4KNA+Q5sqM+tA=
github.com/openstack-k8s-operators/glance-operator/api v0.6.1-0.20260307070902-e95146e9e7f0 h1:qxvQv2nb4JKTUt+0izG6kEoicSgqUutqZOyz9SbtDVw=
github.com/openstack-k8s-operators/glance-operator/api v0.6.1-0.20260307070902-e95146e9e7f0/go.mod h1:HFww0mYz6ziCXbUqF5QH0OHVVfv+2At3zxG3gpIDjYA=
github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20260304090236-61c1f63e5bfb h1:LRrECidXOAJXJts+1TJgum1ZGNJIQj3v73hdC+NSqo8=
github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20260304090236-61c1f63e5bfb/go.mod h1:sXlGVZlqKvRJ0RXGb1ze6a7e5+N/ZOVqSpOTGrBVhIo=
github.com/openstack-k8s-operators/horizon-operator/api v0.6.1-0.20260228155252-bb17197b83a6 h1:AtuwSvzQs3UoVY37KouH27un8uMqJ+mZvpCc/Y019Ho=
Expand Down
6 changes: 5 additions & 1 deletion bindata/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4923,7 +4923,7 @@ spec:
type: string
type: object
type:
default: split
default: single
enum:
- split
- single
Expand Down Expand Up @@ -21459,6 +21459,8 @@ spec:
availableServiceDefaults:
additionalProperties:
properties:
glanceLocationAPI:
type: string
glanceWsgi:
type: string
type: object
Expand Down Expand Up @@ -21894,6 +21896,8 @@ spec:
type: integer
serviceDefaults:
properties:
glanceLocationAPI:
type: string
glanceWsgi:
type: string
type: object
Expand Down
4 changes: 2 additions & 2 deletions bindata/crds/glance.openstack.org_glanceapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
minimum: 1
type: integer
apiType:
default: external
default: single
enum:
- internal
- external
Expand Down Expand Up @@ -1581,7 +1581,7 @@ spec:
type: string
type: object
type:
default: split
default: single
description: Type - represents the layout of the glanceAPI deployment.
enum:
- split
Expand Down
2 changes: 1 addition & 1 deletion bindata/crds/glance.openstack.org_glances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ spec:
type: string
type: object
type:
default: split
default: single
description: Type - represents the layout of the glanceAPI deployment.
enum:
- split
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4658,7 +4658,7 @@ spec:
type: string
type: object
type:
default: split
default: single
enum:
- split
- single
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/core.openstack.org_openstackversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ spec:
availableServiceDefaults:
additionalProperties:
properties:
glanceLocationAPI:
type: string
glanceWsgi:
type: string
type: object
Expand Down Expand Up @@ -683,6 +685,8 @@ spec:
type: integer
serviceDefaults:
properties:
glanceLocationAPI:
type: string
glanceWsgi:
type: string
type: object
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,5 @@ replace k8s.io/code-generator => k8s.io/code-generator v0.31.14 //allow-merging
replace k8s.io/component-base => k8s.io/component-base v0.31.14 //allow-merging

replace github.com/cert-manager/cmctl/v2 => github.com/cert-manager/cmctl/v2 v2.1.2-0.20241127223932-88edb96860cf //allow-merging

replace github.com/openstack-k8s-operators/glance-operator/api => github.com/fmount/glance-operator/api v0.1.2-0.20260305205814-319db2e0e586
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjT
github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fmount/glance-operator/api v0.1.2-0.20260305205814-319db2e0e586 h1:JGoFeaOx2eHXnXSeE63wE+8RYfUcpBe/3G8+VCYPM8Y=
github.com/fmount/glance-operator/api v0.1.2-0.20260305205814-319db2e0e586/go.mod h1:4Y0Q6mnvhxYe4ZXhfr20NAZ23QOT5qsaU3R1E5tdd34=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
Expand Down Expand Up @@ -144,8 +146,6 @@ github.com/openstack-k8s-operators/cinder-operator/api v0.6.1-0.20260304071337-6
github.com/openstack-k8s-operators/cinder-operator/api v0.6.1-0.20260304071337-63312061d576/go.mod h1:Ta5iogB0ASRIz3tZBV5tmuWBkxKfLcCX/zm1sLLs4MM=
github.com/openstack-k8s-operators/designate-operator/api v0.6.1-0.20260302083231-563bef879f57 h1:vgIrNDgCARoTi/EvPG8U4DPt9YXeCbneJEAI1Yyi2KQ=
github.com/openstack-k8s-operators/designate-operator/api v0.6.1-0.20260302083231-563bef879f57/go.mod h1:mvJ6d6hH6vM9KH3Gs7Z7coAEaHe0oI4KNA+Q5sqM+tA=
github.com/openstack-k8s-operators/glance-operator/api v0.6.1-0.20260307070902-e95146e9e7f0 h1:qxvQv2nb4JKTUt+0izG6kEoicSgqUutqZOyz9SbtDVw=
github.com/openstack-k8s-operators/glance-operator/api v0.6.1-0.20260307070902-e95146e9e7f0/go.mod h1:HFww0mYz6ziCXbUqF5QH0OHVVfv+2At3zxG3gpIDjYA=
github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20260304090236-61c1f63e5bfb h1:LRrECidXOAJXJts+1TJgum1ZGNJIQj3v73hdC+NSqo8=
github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20260304090236-61c1f63e5bfb/go.mod h1:sXlGVZlqKvRJ0RXGb1ze6a7e5+N/ZOVqSpOTGrBVhIo=
github.com/openstack-k8s-operators/horizon-operator/api v0.6.1-0.20260228155252-bb17197b83a6 h1:AtuwSvzQs3UoVY37KouH27un8uMqJ+mZvpCc/Y019Ho=
Expand Down
5 changes: 5 additions & 0 deletions internal/openstack/glance.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ func ReconcileGlance(ctx context.Context, instance *corev1beta1.OpenStackControl
} else {
glance.GetAnnotations()[glancev1.GlanceWSGILabel] = "false"
}
if version.Status.ServiceDefaults.GlanceLocationAPI != nil && *version.Status.ServiceDefaults.GlanceLocationAPI == "true" {
glance.GetAnnotations()[glancev1.GlanceLocationAPILabel] = "true"
} else {
glance.GetAnnotations()[glancev1.GlanceLocationAPILabel] = "false"
}

// Append globally defined extraMounts to the service's own list.
for _, ev := range instance.Spec.ExtraMounts {
Expand Down
4 changes: 3 additions & 1 deletion internal/openstack/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/api/core/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
)
Expand Down Expand Up @@ -228,7 +229,8 @@ func InitializeOpenStackVersionServiceDefaults(ctx context.Context) *corev1beta1
// but get set to true here for FR3 available versions and thus provide a way for services to migrate
// to new deployment topologies
trueString := "true"
defaults.GlanceWsgi = &trueString // all new glance deployments use WSGI by default (FR3 and later)
defaults.GlanceWsgi = &trueString // all new glance deployments use WSGI by default (FR3 and later)
defaults.GlanceLocationAPI = ptr.To("false") // disable location-api for RHOSO 18: this boolean can be switched to true with RHOSO 19 release

return defaults
}
Expand Down
8 changes: 4 additions & 4 deletions test/functional/ctlplane/openstackoperator_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3556,8 +3556,8 @@ var _ = Describe("OpenStackOperator Webhook", func() {
Expect(errors.As(err, &statusError)).To(BeTrue())
Expect(statusError.ErrStatus.Details.Kind).To(Equal("OpenStackControlPlane"))
Expect(statusError.ErrStatus.Message).To(
ContainSubstring(
"Invalid value: \"foo-1234567890-1234567890-1234567890-1234567890-1234567890\": must be no more than 39 characters"),
MatchRegexp(
"Invalid value: \"foo-1234567890-1234567890-1234567890-1234567890-1234567890\": must be no more than \\d+ characters"),
)
})

Expand Down Expand Up @@ -3601,8 +3601,8 @@ var _ = Describe("OpenStackOperator Webhook", func() {
Expect(errors.As(err, &statusError)).To(BeTrue())
Expect(statusError.ErrStatus.Details.Kind).To(Equal("OpenStackControlPlane"))
Expect(statusError.ErrStatus.Message).To(
ContainSubstring(
"Invalid value: \"foo-1234567890-1234567890-1234567890-1234567890-1234567890\": must be no more than 33 characters"),
MatchRegexp(
"Invalid value: \"foo-1234567890-1234567890-1234567890-1234567890-1234567890\": must be no more than \\d+ characters"),
)
})

Expand Down
Loading