Skip to content

Commit

Permalink
rollback comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiccini committed Sep 12, 2024
1 parent 0f59735 commit a16280f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions controllers/core/openstackversion_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"context"
"os"
"strings"
"fmt"

k8s_errors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -177,7 +176,6 @@ func (r *OpenStackVersionReconciler) Reconcile(ctx context.Context, req ctrl.Req

instance.Status.AvailableVersion = &envAvailableVersion
defaults := openstack.InitializeOpenStackVersionImageDefaults(ctx, envContainerImages)
Log.Info(fmt.Sprintf("%+v", defaults))
if instance.Status.ContainerImageVersionDefaults == nil {
instance.Status.ContainerImageVersionDefaults = make(map[string]*corev1beta1.ContainerDefaults)
}
Expand All @@ -192,7 +190,6 @@ func (r *OpenStackVersionReconciler) Reconcile(ctx context.Context, req ctrl.Req
return ctrl.Result{}, nil
}
instance.Status.ContainerImages = openstack.GetContainerImages(val, *instance)
Log.Info(fmt.Sprintf("%+v", instance.Status.ContainerImages))

instance.Status.Conditions.MarkTrue(
corev1beta1.OpenStackVersionInitialized,
Expand Down
4 changes: 2 additions & 2 deletions pkg/openstack/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func InitializeOpenStackVersionImageDefaults(ctx context.Context, envImages map[

d := reflect.ValueOf(defaults).Elem()
for key, val := range envImages {
Log.Info(fmt.Sprintf("Initialize OpenStackVersion Image Defaults: %s", key))
//Log.Info(fmt.Sprintf("Initialize OpenStackVersion Image Defaults: %s", key))

r := regexp.MustCompile(`[A-Za-z0-9]+`)
matches := r.FindAllString(key, -1)
Expand All @@ -40,7 +40,7 @@ func InitializeOpenStackVersionImageDefaults(ctx context.Context, envImages map[
// format API so we adhere to go linting standards
fieldName = strings.Replace(fieldName, "Api", "API", -1)
}
Log.Info(fmt.Sprintf("Initialize Field name: %s", fieldName))
//Log.Info(fmt.Sprintf("Initialize Field name: %s", fieldName))
field := d.FieldByName(fieldName)
if field.IsValid() && field.CanSet() {
field.Set(reflect.ValueOf(val))
Expand Down

0 comments on commit a16280f

Please sign in to comment.