Skip to content

Commit

Permalink
Revert "lowercase test"
Browse files Browse the repository at this point in the history
This reverts commit b657ccf.
  • Loading branch information
lmiccini committed Sep 11, 2024
1 parent 72d39bc commit 2d29f28
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17611,7 +17611,7 @@ spec:
type: string
infraDnsmasqImage:
type: string
infraInstanceHaImage:
infraInstanceHAImage:
type: string
infraMemcachedImage:
type: string
Expand Down
6 changes: 3 additions & 3 deletions apis/bases/core.openstack.org_openstackversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ spec:
type: string
infraDnsmasqImage:
type: string
infraInstanceHaImage:
infraInstanceHAImage:
type: string
infraMemcachedImage:
type: string
Expand Down Expand Up @@ -330,7 +330,7 @@ spec:
type: string
infraDnsmasqImage:
type: string
infraInstanceHaImage:
infraInstanceHAImage:
type: string
infraMemcachedImage:
type: string
Expand Down Expand Up @@ -506,7 +506,7 @@ spec:
type: string
infraDnsmasqImage:
type: string
infraInstanceHaImage:
infraInstanceHAImage:
type: string
infraMemcachedImage:
type: string
Expand Down
12 changes: 6 additions & 6 deletions apis/core/v1beta1/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion apis/core/v1beta1/openstackversion_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
4 changes: 2 additions & 2 deletions apis/core/v1beta1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -17611,7 +17611,7 @@ spec:
type: string
infraDnsmasqImage:
type: string
infraInstanceHaImage:
infraInstanceHAImage:
type: string
infraMemcachedImage:
type: string
Expand Down
6 changes: 3 additions & 3 deletions config/crd/bases/core.openstack.org_openstackversions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ spec:
type: string
infraDnsmasqImage:
type: string
infraInstanceHaImage:
infraInstanceHAImage:
type: string
infraMemcachedImage:
type: string
Expand Down Expand Up @@ -330,7 +330,7 @@ spec:
type: string
infraDnsmasqImage:
type: string
infraInstanceHaImage:
infraInstanceHAImage:
type: string
infraMemcachedImage:
type: string
Expand Down Expand Up @@ -506,7 +506,7 @@ spec:
type: string
infraDnsmasqImage:
type: string
infraInstanceHaImage:
infraInstanceHAImage:
type: string
infraMemcachedImage:
type: string
Expand Down
2 changes: 1 addition & 1 deletion controllers/core/openstackcontrolplane_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}) {
Expand Down
18 changes: 9 additions & 9 deletions pkg/openstack/instanceha.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/openstack/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 2d29f28

Please sign in to comment.