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 @@ -256,6 +256,8 @@ spec:
type: string
glanceWsgi:
type: string
ironicInspectInterface:
type: string
manilaSharev1:
type: string
mariadbVersion:
Expand Down Expand Up @@ -701,6 +703,8 @@ spec:
type: string
glanceWsgi:
type: string
ironicInspectInterface:
type: string
manilaSharev1:
type: string
mariadbVersion:
Expand Down
15 changes: 8 additions & 7 deletions api/core/v1beta1/openstackversion_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ type ContainerTemplate struct {
DesignateWorkerImage *string `json:"designateWorkerImage,omitempty"`
EdpmFrrImage *string `json:"edpmFrrImage,omitempty"`
// Deprecated: EdpmIscsidImage is no longer used. iscsid now runs on the host instead of in a container.
EdpmIscsidImage *string `json:"edpmIscsidImage,omitempty"`
EdpmIscsidImage *string `json:"edpmIscsidImage,omitempty"`
// Deprecated: EdpmLogrotateCrondImage is no longer used. logrotate-crond has been removed.
EdpmLogrotateCrondImage *string `json:"edpmLogrotateCrondImage,omitempty"`
// Deprecated: EdpmMultipathdImage is no longer used. multipathd now runs on the host instead of in a container.
Expand Down Expand Up @@ -300,12 +300,13 @@ type ContainerTemplate struct {
// ServiceDefaults - struct that contains defaults for OSP services that can change over time
// but are associated with a specific OpenStack release version
type ServiceDefaults struct {
GlanceWsgi *string `json:"glanceWsgi,omitempty"`
RabbitmqVersion *string `json:"rabbitmqVersion,omitempty"`
MariadbVersion *string `json:"mariadbVersion,omitempty"`
GlanceLocationAPI *string `json:"glanceLocationAPI,omitempty"`
ManilaSharev1 *string `json:"manilaSharev1,omitempty"`
NeutronWsgi *string `json:"neutronWsgi,omitempty"`
GlanceWsgi *string `json:"glanceWsgi,omitempty"`
RabbitmqVersion *string `json:"rabbitmqVersion,omitempty"`
MariadbVersion *string `json:"mariadbVersion,omitempty"`
GlanceLocationAPI *string `json:"glanceLocationAPI,omitempty"`
ManilaSharev1 *string `json:"manilaSharev1,omitempty"`
NeutronWsgi *string `json:"neutronWsgi,omitempty"`
IronicInspectInterface *string `json:"ironicInspectInterface,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 @@ -22639,6 +22639,8 @@ spec:
type: string
glanceWsgi:
type: string
ironicInspectInterface:
type: string
manilaSharev1:
type: string
mariadbVersion:
Expand Down Expand Up @@ -23084,6 +23086,8 @@ spec:
type: string
glanceWsgi:
type: string
ironicInspectInterface:
type: string
manilaSharev1:
type: string
mariadbVersion:
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 @@ -256,6 +256,8 @@ spec:
type: string
glanceWsgi:
type: string
ironicInspectInterface:
type: string
manilaSharev1:
type: string
mariadbVersion:
Expand Down Expand Up @@ -701,6 +703,8 @@ spec:
type: string
glanceWsgi:
type: string
ironicInspectInterface:
type: string
manilaSharev1:
type: string
mariadbVersion:
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/core/openstackversion_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (r *OpenStackVersionReconciler) Reconcile(ctx context.Context, req ctrl.Req
if instance.Status.AvailableServiceDefaults == nil {
instance.Status.AvailableServiceDefaults = make(map[string]*corev1beta1.ServiceDefaults)
}
// store the service defaults for the currently available version
// store the service defaults for each available version
Comment thread
karelyatin marked this conversation as resolved.
instance.Status.AvailableServiceDefaults[envAvailableVersion] = serviceDefaults

serviceDefVal, ok := instance.Status.AvailableServiceDefaults[instance.Spec.TargetVersion]
Expand Down
11 changes: 11 additions & 0 deletions internal/openstack/ironic.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,17 @@ func ReconcileIronic(ctx context.Context, instance *corev1beta1.OpenStackControl
ironic.Spec.Secret = instance.Spec.Secret
}

// Propagate inspect interface from ServiceDefaults if set.
// "inspector" for deployments with ironic < v32.0 and
// "agent" for deployments for ironic v32.0+.
if version.Status.ServiceDefaults.IronicInspectInterface != nil &&
*version.Status.ServiceDefaults.IronicInspectInterface != "" {
if ironic.Annotations == nil {
ironic.Annotations = map[string]string{}
}
ironic.Annotations[ironicv1.IronicInspectInterfaceAnnotation] = *version.Status.ServiceDefaults.IronicInspectInterface
}

err := controllerutil.SetControllerReference(helper.GetBeforeObject(), ironic, helper.GetScheme())
if err != nil {
return err
Expand Down
2 changes: 2 additions & 0 deletions internal/openstack/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ func InitializeOpenStackVersionServiceDefaults(ctx context.Context) *corev1beta1
// "10.11" in the same change that moves
// RELATED_IMAGE_MARIADB_IMAGE_URL_DEFAULT to a 10.11 image.

defaults.IronicInspectInterface = ptr.To("inspector") // TODO: Override to agent for RHOSO 19+ in OpenStackVersion
Comment thread
karelyatin marked this conversation as resolved.

return defaults
}

Expand Down
Loading