Skip to content
Merged
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
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
rabbitmqVersion:
Expand Down Expand Up @@ -685,6 +687,8 @@ spec:
type: integer
serviceDefaults:
properties:
glanceLocationAPI:
type: string
glanceWsgi:
type: string
rabbitmqVersion:
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 @@ -179,6 +179,7 @@ type ContainerTemplate struct {
type ServiceDefaults struct {
GlanceWsgi *string `json:"glanceWsgi,omitempty"`
RabbitmqVersion *string `json:"rabbitmqVersion,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.

4 changes: 4 additions & 0 deletions bindata/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21474,6 +21474,8 @@ spec:
availableServiceDefaults:
additionalProperties:
properties:
glanceLocationAPI:
type: string
glanceWsgi:
type: string
rabbitmqVersion:
Expand Down Expand Up @@ -21911,6 +21913,8 @@ spec:
type: integer
serviceDefaults:
properties:
glanceLocationAPI:
type: string
glanceWsgi:
type: string
rabbitmqVersion:
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
rabbitmqVersion:
Expand Down Expand Up @@ -685,6 +687,8 @@ spec:
type: integer
serviceDefaults:
properties:
glanceLocationAPI:
type: string
glanceWsgi:
type: string
rabbitmqVersion:
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

versionString := "4.2"
defaults.RabbitmqVersion = &versionString // all new rabbitmq deployments will have rabbitmq-server 4.2 (FR5)
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 @@ -3718,8 +3718,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 @@ -3763,8 +3763,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