diff --git a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml index 665ff2def..9281276b7 100644 --- a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -17611,7 +17611,7 @@ spec: type: string infraDnsmasqImage: type: string - infraInstanceHaImage: + infraInstanceHAImage: type: string infraMemcachedImage: type: string diff --git a/apis/bases/core.openstack.org_openstackversions.yaml b/apis/bases/core.openstack.org_openstackversions.yaml index 81eab2b18..b617f16a2 100644 --- a/apis/bases/core.openstack.org_openstackversions.yaml +++ b/apis/bases/core.openstack.org_openstackversions.yaml @@ -125,7 +125,7 @@ spec: type: string infraDnsmasqImage: type: string - infraInstanceHaImage: + infraInstanceHAImage: type: string infraMemcachedImage: type: string @@ -330,7 +330,7 @@ spec: type: string infraDnsmasqImage: type: string - infraInstanceHaImage: + infraInstanceHAImage: type: string infraMemcachedImage: type: string @@ -506,7 +506,7 @@ spec: type: string infraDnsmasqImage: type: string - infraInstanceHaImage: + infraInstanceHAImage: type: string infraMemcachedImage: type: string diff --git a/apis/core/v1beta1/conditions.go b/apis/core/v1beta1/conditions.go index c0617e70e..1cca2ec62 100644 --- a/apis/core/v1beta1/conditions.go +++ b/apis/core/v1beta1/conditions.go @@ -147,8 +147,8 @@ const ( // OpenStackControlPlaneTestCMReadyCondition Status=True condition which indicates if Test operator CM is ready OpenStackControlPlaneTestCMReadyCondition condition.Type = "OpenStackControlPlaneTestCMReadyCondition" - // OpenStackControlPlaneInstanceHaCMReadyCondition Status=True condition which indicates if InstanceHa CM is ready - OpenStackControlPlaneInstanceHaCMReadyCondition condition.Type = "OpenStackControlPlaneInstanceHaCMReadyCondition" + // OpenStackControlPlaneInstanceHACMReadyCondition Status=True condition which indicates if InstanceHA CM is ready + OpenStackControlPlaneInstanceHACMReadyCondition condition.Type = "OpenStackControlPlaneInstanceHACMReadyCondition" ) // Common Messages used by API objects. @@ -460,11 +460,11 @@ const ( // OpenStackControlPlaneTestCMReadyMessage OpenStackControlPlaneTestCMReadyMessage = "OpenStackControlPlane Test Operator CM is available" - // OpenStackControlPlaneInstanceHaCMReadyErrorMessage - OpenStackControlPlaneInstanceHaCMReadyErrorMessage = "OpenStackControlPlane InstanceHa CM error occured %s" + // OpenStackControlPlaneInstanceHACMReadyErrorMessage + OpenStackControlPlaneInstanceHACMReadyErrorMessage = "OpenStackControlPlane InstanceHA CM error occured %s" - // OpenStackControlPlaneInstanceHaCMReadyMessage - OpenStackControlPlaneInstanceHaCMReadyMessage = "OpenStackControlPlane InstanceHa CM is available" + // OpenStackControlPlaneInstanceHACMReadyMessage + OpenStackControlPlaneInstanceHACMReadyMessage = "OpenStackControlPlane InstanceHA CM is available" ) // Version Conditions used by API objects. diff --git a/apis/core/v1beta1/openstackversion_types.go b/apis/core/v1beta1/openstackversion_types.go index 9e99e619f..1058c8d95 100644 --- a/apis/core/v1beta1/openstackversion_types.go +++ b/apis/core/v1beta1/openstackversion_types.go @@ -114,7 +114,7 @@ type ContainerTemplate struct { InfraDnsmasqImage *string `json:"infraDnsmasqImage,omitempty"` InfraMemcachedImage *string `json:"infraMemcachedImage,omitempty"` InfraRedisImage *string `json:"infraRedisImage,omitempty"` - InfraInstanceHaImage *string `json:"infraInstanceHaImage,omitempty"` + InfraInstanceHAImage *string `json:"infraInstanceHAImage,omitempty"` IronicAPIImage *string `json:"ironicAPIImage,omitempty"` IronicConductorImage *string `json:"ironicConductorImage,omitempty"` IronicInspectorImage *string `json:"ironicInspectorImage,omitempty"` diff --git a/apis/core/v1beta1/zz_generated.deepcopy.go b/apis/core/v1beta1/zz_generated.deepcopy.go index 8dd932a71..b558f2595 100644 --- a/apis/core/v1beta1/zz_generated.deepcopy.go +++ b/apis/core/v1beta1/zz_generated.deepcopy.go @@ -653,8 +653,8 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.InfraInstanceHaImage != nil { - in, out := &in.InfraInstanceHaImage, &out.InfraInstanceHaImage + if in.InfraInstanceHAImage != nil { + in, out := &in.InfraInstanceHAImage, &out.InfraInstanceHAImage *out = new(string) **out = **in } diff --git a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml index 665ff2def..9281276b7 100644 --- a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -17611,7 +17611,7 @@ spec: type: string infraDnsmasqImage: type: string - infraInstanceHaImage: + infraInstanceHAImage: type: string infraMemcachedImage: type: string diff --git a/config/crd/bases/core.openstack.org_openstackversions.yaml b/config/crd/bases/core.openstack.org_openstackversions.yaml index 81eab2b18..b617f16a2 100644 --- a/config/crd/bases/core.openstack.org_openstackversions.yaml +++ b/config/crd/bases/core.openstack.org_openstackversions.yaml @@ -125,7 +125,7 @@ spec: type: string infraDnsmasqImage: type: string - infraInstanceHaImage: + infraInstanceHAImage: type: string infraMemcachedImage: type: string @@ -330,7 +330,7 @@ spec: type: string infraDnsmasqImage: type: string - infraInstanceHaImage: + infraInstanceHAImage: type: string infraMemcachedImage: type: string @@ -506,7 +506,7 @@ spec: type: string infraDnsmasqImage: type: string - infraInstanceHaImage: + infraInstanceHAImage: type: string infraMemcachedImage: type: string diff --git a/controllers/core/openstackcontrolplane_controller.go b/controllers/core/openstackcontrolplane_controller.go index 732bbecd1..3f7a42b6c 100644 --- a/controllers/core/openstackcontrolplane_controller.go +++ b/controllers/core/openstackcontrolplane_controller.go @@ -452,7 +452,7 @@ func (r *OpenStackControlPlaneReconciler) reconcileNormal(ctx context.Context, i return ctrlResult, nil } - ctrlResult, err = openstack.ReconcileInstanceHa(ctx, instance, version, helper) + ctrlResult, err = openstack.ReconcileInstanceHA(ctx, instance, version, helper) if err != nil { return ctrl.Result{}, err } else if (ctrlResult != ctrl.Result{}) { diff --git a/pkg/openstack/instanceha.go b/pkg/openstack/instanceha.go index e14b52b2c..af0a427f0 100644 --- a/pkg/openstack/instanceha.go +++ b/pkg/openstack/instanceha.go @@ -13,19 +13,19 @@ import ( ) const ( - InstanceHaConfigMap = "infra-instanceha-config" - InstanceHaImageKey = "instanceha-image" + InstanceHAConfigMap = "infra-instanceha-config" + InstanceHAImageKey = "instanceha-image" ) -func ReconcileInstanceHa(ctx context.Context, instance *corev1beta1.OpenStackControlPlane, version *corev1beta1.OpenStackVersion, helper *helper.Helper) (ctrl.Result, error) { +func ReconcileInstanceHA(ctx context.Context, instance *corev1beta1.OpenStackControlPlane, version *corev1beta1.OpenStackVersion, helper *helper.Helper) (ctrl.Result, error) { missingImageDefault := "" customData := map[string]string{ - InstanceHaImageKey: *getImg(version.Status.ContainerImages.InfraInstanceHaImage, &missingImageDefault), + InstanceHAImageKey: *getImg(version.Status.ContainerImages.InfraInstanceHAImage, &missingImageDefault), } cms := []util.Template{ { - Name: InstanceHaConfigMap, + Name: InstanceHAConfigMap, Namespace: instance.Namespace, InstanceType: instance.Kind, Labels: nil, @@ -36,18 +36,18 @@ func ReconcileInstanceHa(ctx context.Context, instance *corev1beta1.OpenStackCon if err := configmap.EnsureConfigMaps(ctx, helper, instance, cms, nil); err != nil { instance.Status.Conditions.Set(condition.FalseCondition( - corev1beta1.OpenStackControlPlaneInstanceHaCMReadyCondition, + corev1beta1.OpenStackControlPlaneInstanceHACMReadyCondition, condition.ErrorReason, condition.SeverityWarning, - corev1beta1.OpenStackControlPlaneInstanceHaCMReadyErrorMessage, + corev1beta1.OpenStackControlPlaneInstanceHACMReadyErrorMessage, err.Error())) return ctrl.Result{}, err } instance.Status.Conditions.Set(condition.TrueCondition( - corev1beta1.OpenStackControlPlaneInstanceHaCMReadyCondition, - corev1beta1.OpenStackControlPlaneInstanceHaCMReadyMessage, + corev1beta1.OpenStackControlPlaneInstanceHACMReadyCondition, + corev1beta1.OpenStackControlPlaneInstanceHACMReadyMessage, )) return ctrl.Result{}, nil diff --git a/pkg/openstack/version.go b/pkg/openstack/version.go index c38a35e9d..26055139e 100644 --- a/pkg/openstack/version.go +++ b/pkg/openstack/version.go @@ -126,7 +126,7 @@ func GetContainerImages(defaults *corev1beta1.ContainerDefaults, instance corev1 InfraDnsmasqImage: getImg(instance.Spec.CustomContainerImages.InfraDnsmasqImage, defaults.InfraDnsmasqImage), InfraMemcachedImage: getImg(instance.Spec.CustomContainerImages.InfraMemcachedImage, defaults.InfraMemcachedImage), InfraRedisImage: getImg(instance.Spec.CustomContainerImages.InfraRedisImage, defaults.InfraRedisImage), - InfraInstanceHaImage: getImg(instance.Spec.CustomContainerImages.InfraInstanceHaImage, defaults.InfraInstanceHaImage), + InfraInstanceHAImage: getImg(instance.Spec.CustomContainerImages.InfraInstanceHAImage, defaults.InfraInstanceHAImage), IronicAPIImage: getImg(instance.Spec.CustomContainerImages.IronicAPIImage, defaults.IronicAPIImage), IronicConductorImage: getImg(instance.Spec.CustomContainerImages.IronicConductorImage, defaults.IronicConductorImage), IronicInspectorImage: getImg(instance.Spec.CustomContainerImages.IronicInspectorImage, defaults.IronicInspectorImage),