diff --git a/controllers/appWrapper_controller_test.go b/controllers/appWrapper_controller_test.go index b3445d9..b0bcc07 100644 --- a/controllers/appWrapper_controller_test.go +++ b/controllers/appWrapper_controller_test.go @@ -1,6 +1,7 @@ package controllers import ( + "context" "testing" "github.com/onsi/gomega" @@ -99,7 +100,7 @@ func (r *AppWrapperReconciler) TestDiscoverInstanceTypes(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - result := r.discoverInstanceTypes(test.input) + result := r.discoverInstanceTypes(context.TODO(), test.input) g.Expect(result).To(gomega.Equal(test.expected)) }) } diff --git a/controllers/appwrapper_controller.go b/controllers/appwrapper_controller.go index 77d4229..5f35450 100644 --- a/controllers/appwrapper_controller.go +++ b/controllers/appwrapper_controller.go @@ -29,7 +29,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes" - "k8s.io/klog" "k8s.io/apimachinery/pkg/labels" ctrl "sigs.k8s.io/controller-runtime" @@ -81,7 +80,6 @@ const ( // For more details, check Reconcile and its Result here: // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile func (r *AppWrapperReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - _ = log.FromContext(ctx) // todo: Move the getOCMClusterID call out of reconcile loop. // Only reason we are calling it here is that the client is not able to make @@ -122,7 +120,7 @@ func (r *AppWrapperReconciler) Reconcile(ctx context.Context, req ctrl.Request) return ctrl.Result{}, nil } - demandPerInstanceType := r.discoverInstanceTypes(&appwrapper) + demandPerInstanceType := r.discoverInstanceTypes(ctx, &appwrapper) if ocmSecretRef := r.Config.OCMSecretRef; ocmSecretRef != nil { return r.scaleMachinePool(ctx, &appwrapper, demandPerInstanceType) } else { @@ -137,6 +135,7 @@ func (r *AppWrapperReconciler) Reconcile(ctx context.Context, req ctrl.Request) } func (r *AppWrapperReconciler) finalizeScalingDownMachines(ctx context.Context, appwrapper *arbv1.AppWrapper) error { + logger := ctrl.LoggerFrom(ctx) if appwrapper.Status.State == arbv1.AppWrapperStateCompleted { deletionMessage = "completed" } else { @@ -147,24 +146,41 @@ func (r *AppWrapperReconciler) finalizeScalingDownMachines(ctx context.Context, case "reuse": matchedAw := r.findExactMatch(ctx, appwrapper) if matchedAw != nil { - klog.Infof("Appwrapper %s %s, swapping machines to %s", appwrapper.Name, deletionMessage, matchedAw.Name) + logger.Info( + "AppWrapper deleted transferring machines", + "oldAppWrapper", appwrapper, + "deletionMessage", deletionMessage, + "newAppWrapper", matchedAw, + ) if err := r.swapNodeLabels(ctx, appwrapper, matchedAw); err != nil { return err } } else { - klog.Infof("Appwrapper %s %s, scaling down machines", appwrapper.Name, deletionMessage) + logger.Info( + "Scaling down machines associated with deleted AppWrapper", + "appWrapper", appwrapper, + "deletionMessage", deletionMessage, + ) if err := r.annotateToDeleteMachine(ctx, appwrapper); err != nil { return err } } case "duplicate": - klog.Infof("Appwrapper %s scale-down machineset: %s ", deletionMessage, appwrapper.Name) + logger.Info( + "AppWrapper deleted, scaling down machineset", + "appWrapper", appwrapper, + "deletionMessage", deletionMessage, + ) if err := r.deleteMachineSet(ctx, appwrapper); err != nil { return err } } } else { - klog.Infof("Appwrapper %s scale-down machine pool: %s ", deletionMessage, appwrapper.Name) + logger.Info( + "AppWrapper deleted, scaling down machine pool", + "appWrapper", appwrapper, + "deletionMessage", deletionMessage, + ) if _, err := r.deleteMachinePool(ctx, appwrapper); err != nil { return err } @@ -175,6 +191,7 @@ func (r *AppWrapperReconciler) finalizeScalingDownMachines(ctx context.Context, // SetupWithManager sets up the controller with the Manager. func (r *AppWrapperReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error { + logger := ctrl.LoggerFrom(ctx) restConfig := mgr.GetConfig() var err error @@ -197,12 +214,12 @@ func (r *AppWrapperReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Ma if ok, err := r.machinePoolExists(); err != nil { return err } else if ok { - klog.Info("Using machine pools for cluster auto-scaling") + logger.Info("Using machine pools for cluster auto-scaling") } } return ctrl.NewControllerManagedBy(mgr). - For(&arbv1.AppWrapper{}). + For(&arbv1.AppWrapper{}).Named("instascale"). Complete(r) } @@ -210,7 +227,8 @@ func (r *AppWrapperReconciler) getOCMSecret(ctx context.Context, secretRef *core return r.kubeClient.CoreV1().Secrets(secretRef.Namespace).Get(ctx, secretRef.Name, metav1.GetOptions{}) } -func (r *AppWrapperReconciler) discoverInstanceTypes(aw *arbv1.AppWrapper) map[string]int { +func (r *AppWrapperReconciler) discoverInstanceTypes(ctx context.Context, aw *arbv1.AppWrapper) map[string]int { + logger := ctrl.LoggerFrom(ctx) demandMapPerInstanceType := make(map[string]int) var instanceRequired []string for k, v := range aw.Labels { @@ -220,7 +238,10 @@ func (r *AppWrapperReconciler) discoverInstanceTypes(aw *arbv1.AppWrapper) map[s } if len(instanceRequired) < 1 { - klog.Infof("Found AW %s that cannot be scaled due to missing orderedinstance label", aw.ObjectMeta.Name) + logger.Info( + "AppWrapper cannot be scaled out due to missing orderedinstance label", + "appWrapper", aw, + ) return demandMapPerInstanceType } @@ -237,6 +258,7 @@ func (r *AppWrapperReconciler) discoverInstanceTypes(aw *arbv1.AppWrapper) map[s } func (r *AppWrapperReconciler) findExactMatch(ctx context.Context, aw *arbv1.AppWrapper) *arbv1.AppWrapper { + logger := ctrl.LoggerFrom(ctx) var match *arbv1.AppWrapper = nil appwrappers := arbv1.AppWrapperList{} @@ -250,7 +272,7 @@ func (r *AppWrapperReconciler) findExactMatch(ctx context.Context, aw *arbv1.App err := r.List(ctx, &appwrappers, listOptions) if err != nil { - klog.Error("Cannot list queued appwrappers, associated machines will be deleted") + logger.Error(err, "Cannot list queued appwrappers, associated machines will be deleted") return match } var existingAcquiredMachineTypes = "" @@ -265,7 +287,11 @@ func (r *AppWrapperReconciler) findExactMatch(ctx context.Context, aw *arbv1.App if eachAw.Status.State != arbv1.AppWrapperStateEnqueued { if eachAw.Labels["orderedinstance"] == existingAcquiredMachineTypes { match = &eachAw - klog.Infof("Found exact match, %v appwrapper has acquired machinetypes %v", eachAw.Name, existingAcquiredMachineTypes) + logger.Info( + "AppWrapper has successfully acquired requested machine types", + "appWrapper", eachAw, + "acquiredMachineTypes", existingAcquiredMachineTypes, + ) break } } diff --git a/controllers/machinepools.go b/controllers/machinepools.go index a5d4f78..dabd90a 100644 --- a/controllers/machinepools.go +++ b/controllers/machinepools.go @@ -3,7 +3,6 @@ package controllers import ( "context" "fmt" - "os" "strings" ocmsdk "github.com/openshift-online/ocm-sdk-go" @@ -12,7 +11,6 @@ import ( arbv1 "github.com/project-codeflare/multi-cluster-app-dispatcher/pkg/apis/controller/v1beta1" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" ctrl "sigs.k8s.io/controller-runtime" ) @@ -44,9 +42,10 @@ func hasAwLabel(machinePool *cmv1.MachinePool, aw *arbv1.AppWrapper) bool { } func (r *AppWrapperReconciler) scaleMachinePool(ctx context.Context, aw *arbv1.AppWrapper, demandPerInstanceType map[string]int) (ctrl.Result, error) { + logger := ctrl.LoggerFrom(ctx) connection, err := r.createOCMConnection() if err != nil { - fmt.Fprintf(os.Stderr, "Error creating OCM connection: %v", err) + logger.Error(err, "Error creating OCM connection") return ctrl.Result{}, err } defer connection.Close() @@ -72,28 +71,40 @@ func (r *AppWrapperReconciler) scaleMachinePool(ctx context.Context, aw *arbv1.A if numberOfMachines != replicas { m := make(map[string]string) m[aw.Name] = aw.Name - klog.Infof("The instanceRequired array: %v", userRequestedInstanceType) machinePoolID := strings.ReplaceAll(aw.Name+"-"+userRequestedInstanceType, ".", "-") createMachinePool, err := cmv1.NewMachinePool().ID(machinePoolID).InstanceType(userRequestedInstanceType).Replicas(replicas).Labels(m).Build() if err != nil { - klog.Errorf(`Error building MachinePool: %v`, err) + logger.Error( + err, "Error building MachinePool", + "userRequestedInstanceType", userRequestedInstanceType, + ) } - klog.Infof("Built MachinePool with instance type %v and name %v", userRequestedInstanceType, createMachinePool.ID()) + logger.Info( + "Sending MachinePool creation request", + "instanceType", userRequestedInstanceType, + "machinePoolName", createMachinePool.ID(), + ) response, err := clusterMachinePools.Add().Body(createMachinePool).SendContext(ctx) if err != nil { - klog.Errorf(`Error creating MachinePool: %v`, err) + logger.Error(err, "Error creating MachinePool") + } else { + logger.Info( + "Successfully created MachinePool", + "machinePoolName", createMachinePool.ID(), + "response", response, + ) } - klog.Infof("Created MachinePool: %v", response) } } return ctrl.Result{Requeue: false}, nil } func (r *AppWrapperReconciler) deleteMachinePool(ctx context.Context, aw *arbv1.AppWrapper) (ctrl.Result, error) { + logger := ctrl.LoggerFrom(ctx) connection, err := r.createOCMConnection() if err != nil { - fmt.Fprintf(os.Stderr, "Error creating OCM connection: %v", err) + logger.Error(err, "Error creating OCM connection") return ctrl.Result{}, err } defer connection.Close() @@ -107,9 +118,16 @@ func (r *AppWrapperReconciler) deleteMachinePool(ctx context.Context, aw *arbv1. if strings.Contains(id, aw.Name) { targetMachinePool, err := connection.ClustersMgmt().V1().Clusters().Cluster(r.ocmClusterID).MachinePools().MachinePool(id).Delete().SendContext(ctx) if err != nil { - klog.Infof("Error deleting target machinepool %v", targetMachinePool) + logger.Error( + err, "Error deleting machinepool", + "machinePool", targetMachinePool, + ) + } else { + logger.Info( + "Successfully scaled down target machinepool", + "machinePool", targetMachinePool, + ) } - klog.Infof("Successfully Scaled down target machinepool %v", id) } return true }) @@ -129,6 +147,7 @@ func (r *AppWrapperReconciler) machinePoolExists() (bool, error) { // getOCMClusterID determines the internal clusterID to be used for OCM API calls func (r *AppWrapperReconciler) getOCMClusterID(ctx context.Context) error { + logger := ctrl.LoggerFrom(ctx) cv := &configv1.ClusterVersion{} err := r.Get(ctx, types.NamespacedName{Name: "version"}, cv) if err != nil { @@ -139,7 +158,7 @@ func (r *AppWrapperReconciler) getOCMClusterID(ctx context.Context) error { connection, err := r.createOCMConnection() if err != nil { - fmt.Fprintf(os.Stderr, "Error creating OCM connection: %v", err) + logger.Error(err, "Error creating OCM connection") } defer connection.Close() @@ -148,12 +167,17 @@ func (r *AppWrapperReconciler) getOCMClusterID(ctx context.Context) error { response, err := collection.List().Search(fmt.Sprintf("external_id = '%s'", internalClusterID)).Size(1).Page(1).SendContext(ctx) if err != nil { - klog.Errorf(`Error getting cluster id: %v`, err) + logger.Error(err, "Error getting cluster id") } response.Items().Each(func(cluster *cmv1.Cluster) bool { r.ocmClusterID = cluster.ID() - fmt.Printf("%s - %s - %s\n", cluster.ID(), cluster.Name(), cluster.State()) + logger.Info( + "Cluster Info", + "clusterId", cluster.ID(), + "clusterName", cluster.Name(), + "clusterState", cluster.State(), + ) return true }) return nil diff --git a/controllers/machineset.go b/controllers/machineset.go index 956b776..c47ff10 100644 --- a/controllers/machineset.go +++ b/controllers/machineset.go @@ -15,7 +15,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" - "k8s.io/klog" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -26,19 +25,18 @@ const ( ) func (r *AppWrapperReconciler) reconcileCreateMachineSet(ctx context.Context, aw *arbv1.AppWrapper, demandMapPerInstanceType map[string]int) (ctrl.Result, error) { - + logger := ctrl.LoggerFrom(ctx) allMachineSet := machinev1beta1.MachineSetList{} err := r.List(ctx, &allMachineSet) if err != nil { - klog.Infof("Error listing a machineset, %v", err) + logger.Error(err, "Error listing machineset") } - for userRequestedInstanceType := range demandMapPerInstanceType { for _, aMachineSet := range allMachineSet.Items { var existingMachine machinev1beta1.MachineSet - providerConfig, err := ProviderSpecFromRawExtension(aMachineSet.Spec.Template.Spec.ProviderSpec.Value) + providerConfig, err := ProviderSpecFromRawExtension(ctx, aMachineSet.Spec.Template.Spec.ProviderSpec.Value) if err != nil { - klog.Infof("Error retrieving provider config %v", err) + logger.Error(err, "Error retrieving provider config") } if userRequestedInstanceType == providerConfig.InstanceType { copyOfaMachineSet := aMachineSet.DeepCopy() @@ -77,27 +75,37 @@ func (r *AppWrapperReconciler) reconcileCreateMachineSet(ctx context.Context, aw if err := r.Create(ctx, copyOfaMachineSet); err != nil { return ctrl.Result{RequeueAfter: timeFiveSeconds}, err } else { - klog.Infof("Created MachineSet: %v", copyOfaMachineSet.Name) + logger.Info("Created MachineSet", + "machineSet", copyOfaMachineSet, + ) return ctrl.Result{RequeueAfter: timeFiveSeconds}, nil } } //wait until all replicas are available if (replicas - existingMachine.Status.AvailableReplicas) != 0 { - klog.Infof("waiting for machines to be in state Ready. replicas needed: %v and replicas available: %v", replicas, copyOfaMachineSet.Status.AvailableReplicas) - klog.Infof("Querying machineset %v to get updated replicas", copyOfaMachineSet.Name) + logger.Info( + "Waiting for machines to be in Ready state", + "machineSet", copyOfaMachineSet, + "replicasNeeded", replicas, + "replicasAvailable", copyOfaMachineSet.Status.AvailableReplicas, + ) + logger.Info( + "Querying machineset to get updated replicas", + "machineSet", copyOfaMachineSet, + ) // TODO should this be V(X) so it's only available during debug? return ctrl.Result{Requeue: true, RequeueAfter: timeThirtySeconds}, nil } allMachines := machinev1beta1.MachineList{} err = r.List(ctx, &allMachines) if err != nil { - klog.Infof("Error listing machines: %v", err) + logger.Error(err, "Error listing machines") } //map machines to machinesets? //for non-reuse case labels can be added directly to machineset: https://github.com/openshift/machine-api-operator/issues/1077 err = r.List(ctx, &allMachines, listOptions) if err != nil { - klog.Infof("Error listing machines: %v", err) + logger.Error(err, "Error listing machines") } for idx := range allMachines.Items { machine := &allMachines.Items[idx] @@ -105,10 +113,14 @@ func (r *AppWrapperReconciler) reconcileCreateMachineSet(ctx context.Context, aw labelPatch := fmt.Sprintf(`[{"op":"add","path":"/metadata/labels/%s-%s","value":"%s-%s" }]`, aw.Name, aw.Namespace, aw.Name, aw.Namespace) ms, err := r.kubeClient.CoreV1().Nodes().Patch(ctx, nodeName, types.JSONPatchType, []byte(labelPatch), metav1.PatchOptions{}) if err != nil { - klog.Infof("Error patching label to Node: %v", err) + logger.Error(err, "Error patching label to node") } - if len(ms.Labels) > 0 && err == nil { - klog.Infof("label added to node %v, for scaling %v", nodeName, copyOfaMachineSet.Name) + if len(ms.Labels) > 0 && err == nil { // this seems like a strange if statement, if the patch succeeded why are we checking the number of labels and also what if the user has configured the MachineSet to automatically apply a few labels already, this check wouldn't do anything in that case. + logger.Info( + "AppWrapper label added to node", + "nodeName", nodeName, + "machineSet", copyOfaMachineSet, + ) } } } @@ -119,6 +131,7 @@ func (r *AppWrapperReconciler) reconcileCreateMachineSet(ctx context.Context, aw } func (r *AppWrapperReconciler) filterAwMachines(ctx context.Context, aw *arbv1.AppWrapper, userRequestedInstanceType string) []string { + logger := ctrl.LoggerFrom(ctx) label := fmt.Sprintf("%s-%s", aw.Name, aw.Namespace) labelSelector := labels.SelectorFromSet(labels.Set(map[string]string{ label: label, @@ -131,7 +144,7 @@ func (r *AppWrapperReconciler) filterAwMachines(ctx context.Context, aw *arbv1.A machinesWithAwLabel := machinev1beta1.MachineList{} err := r.List(ctx, &machinesWithAwLabel, listOptions) if err != nil { - klog.Infof("Error listing machines: %s", err) + logger.Error(err, "Error listing machines") } var runningAwMachines []string for _, machine := range machinesWithAwLabel.Items { @@ -144,6 +157,7 @@ func (r *AppWrapperReconciler) filterAwMachines(ctx context.Context, aw *arbv1.A } func (r *AppWrapperReconciler) filterAllRunningAwMachines(ctx context.Context, aw *arbv1.AppWrapper) []string { + logger := ctrl.LoggerFrom(ctx) labelSelector := labels.SelectorFromSet(labels.Set(map[string]string{ aw.Name: aw.Name, })) @@ -154,7 +168,7 @@ func (r *AppWrapperReconciler) filterAllRunningAwMachines(ctx context.Context, a var allRunningAwMachines []string err := r.List(ctx, &machinesWithAwLabel, listOptions) if err != nil { - klog.Infof("Error listing machines: %s", err) + logger.Error(err, "Error listing machines") } for _, machine := range machinesWithAwLabel.Items { @@ -169,7 +183,7 @@ func (r *AppWrapperReconciler) filterAllRunningAwMachines(ctx context.Context, a func (r *AppWrapperReconciler) canScaleMachineset(ctx context.Context, aw *arbv1.AppWrapper, demandPerInstanceType map[string]int) bool { //control plane can include any number of nodes //we count how many additional nodes can be added to the cluster - + logger := ctrl.LoggerFrom(ctx) allRunningAwMachines := r.filterAllRunningAwMachines(ctx, aw) var totalNodesAddedByMachinesets int32 = 0 @@ -180,7 +194,12 @@ func (r *AppWrapperReconciler) canScaleMachineset(ctx context.Context, aw *arbv1 totalNodesAddedByMachinesets += int32(count) } if totalNodesAddedByMachinesets >= int32(maxScaleNodesAllowed) { - klog.Infof("Scaling not possible: The nodes allowed %v and total nodes in cluster after node scale-out %v", maxScaleNodesAllowed, totalNodesAddedByMachinesets) + logger.Info( + "Scaling exceeds max scale out", + "scalingLimit", maxScaleNodesAllowed, + "existingScaleout", allRunningAwMachines, + "requestedScaleout", totalNodesAddedByMachinesets, + ) } return totalNodesAddedByMachinesets <= int32(maxScaleNodesAllowed) } @@ -188,20 +207,20 @@ func (r *AppWrapperReconciler) canScaleMachineset(ctx context.Context, aw *arbv1 func (r *AppWrapperReconciler) reconcileReuseMachineSet(ctx context.Context, aw *arbv1.AppWrapper, demandMapPerInstanceType map[string]int) (ctrl.Result, error) { isScaled := false var runningAwMachines []string - + logger := ctrl.LoggerFrom(ctx) // Gather a list of all MachineSets allMachineSets := machinev1beta1.MachineSetList{} if err := r.List(ctx, &allMachineSets); err != nil { - klog.Infof("Error listing MachineSets: %s", err) + logger.Error(err, "Error listing MachineSets") } for userRequestedInstanceType := range demandMapPerInstanceType { // Iterate over each MachineSet in the allMachineSets list for _, aMachineSet := range allMachineSets.Items { // Get the MachineSet's instance type - providerConfig, err := ProviderSpecFromRawExtension(aMachineSet.Spec.Template.Spec.ProviderSpec.Value) + providerConfig, err := ProviderSpecFromRawExtension(ctx, aMachineSet.Spec.Template.Spec.ProviderSpec.Value) if err != nil { - klog.Infof("Error retrieving provider config %v", err) + logger.Error(err, "Error retrieving provider config") } // Label selector for gettings machines of requested type and app wrapper label label := fmt.Sprintf("%s-%s", aw.Name, aw.Namespace) @@ -244,7 +263,7 @@ func (r *AppWrapperReconciler) reconcileReuseMachineSet(ctx context.Context, aw // List all machines currently in the specific MachineSet allExistingMachinesInMs := machinev1beta1.MachineList{} if err := r.List(ctx, &allExistingMachinesInMs, instanceListOptions); err != nil { - klog.Infof("Error listing Machines: %s", err) + logger.Error(err, "Error listing Machines") } /* @@ -256,7 +275,7 @@ func (r *AppWrapperReconciler) reconcileReuseMachineSet(ctx context.Context, aw for _, machine := range allExistingMachinesInMs.Items { err := r.List(ctx, &machinesWithAwLabel, listOptions) if err != nil { - klog.Infof("Error listing machines: %v", err) + logger.Error(err, "Error listing machines") } machinePhase := machine.Status.Phase @@ -284,7 +303,11 @@ func (r *AppWrapperReconciler) reconcileReuseMachineSet(ctx context.Context, aw existingMachinesOwned = append(existingMachinesOwned, machine.Name) } } - klog.Infof("Existing machines owned in %s are %v", copyOfaMachineSet.Name, existingMachinesOwned) + logger.Info( + "Existing scaled machines", + "machineSet", copyOfaMachineSet, + "scaledMachines", existingMachinesOwned, + ) // Apply the requested replica count label to the MachineSet copyOfaMachineSet.Labels[fmt.Sprintf("instascale.codeflare.dev-%s-%s", aw.Name, aw.Namespace)] = strconv.FormatInt(int64(replicas), 10) @@ -296,11 +319,17 @@ func (r *AppWrapperReconciler) reconcileReuseMachineSet(ctx context.Context, aw return ctrl.Result{}, err } } else { - klog.Infof("The instanceRequired array: %v", userRequestedInstanceType) + logger.Info( + "Required instances", + "requestedInstanceType", userRequestedInstanceType, + ) if err := r.Update(ctx, copyOfaMachineSet); err != nil { - klog.Infof("Error updating MachineSet: %s", err) + logger.Error(err, "Error updating MachineSet") } - klog.Infof("Updated MachineSet: %s", copyOfaMachineSet.Name) + logger.Info( + "Updated MachineSet", + "machineSet", copyOfaMachineSet, + ) } return ctrl.Result{Requeue: true}, nil } @@ -309,7 +338,11 @@ func (r *AppWrapperReconciler) reconcileReuseMachineSet(ctx context.Context, aw a message is printed to the console and the Reconcile method is called after 30 seconds */ if replicas != len(runningAwMachines) { - klog.Infof("REUSE: waiting for machines to be in state Ready. replicas needed: %v and replicas available: %v", replicas, len(runningAwMachines)) + logger.Info( + "REUSE: waiting for machines to be in state Ready", + "replicasNeeded", replicas, + "replicasAvailable", len(runningAwMachines), + ) return ctrl.Result{Requeue: true, RequeueAfter: timeThirtySeconds}, nil } } @@ -322,6 +355,7 @@ func (r *AppWrapperReconciler) reconcileReuseMachineSet(ctx context.Context, aw // This function exists for scenarios where the user has altered the number of replicas requested on the AppWrapper func (r *AppWrapperReconciler) removeMachinesBasedOnReplicas(ctx context.Context, aw *arbv1.AppWrapper, userRequestedInstanceType string, replicas int) (ctrl.Result, error) { + logger := ctrl.LoggerFrom(ctx) // We get a list of Nodes with the AppWrapper name and correct instance type labelSelector := labels.SelectorFromSet(labels.Set(map[string]string{ aw.Name: aw.Name, @@ -340,43 +374,59 @@ func (r *AppWrapperReconciler) removeMachinesBasedOnReplicas(ctx context.Context if replicas == numberOfmachines { break } - klog.Infof("Filtered Node name: %s", node.Name) + logger.V(1).Info( + "Retrieved node using label filters", + "node", node, + "labels", labelSelector, + ) // We get the machine annotation from the node in order to get the machine's name for k, v := range node.Annotations { if k == "machine.openshift.io/machine" { machineName := strings.Split(v, "/") - klog.Infof("The machine name to be annotated %v", machineName[1]) + logger.Info( + "Machine to be annotated", + "machineName", machineName[1], + ) // Get the specific machine that owns this node nodeMachine := &machinev1beta1.Machine{} if err := r.Get(ctx, types.NamespacedName{Name: machineName[1], Namespace: namespaceToList}, nodeMachine); err != nil { - klog.Infof("Error getting machine: %s", err) + logger.Error(err, "Error getting Machine") } updateMachine := nodeMachine.DeepCopy() updateMachine.Annotations["machine.openshift.io/cluster-api-delete-machine"] = "true" if err := r.Update(ctx, updateMachine); err != nil { - klog.Infof("Error updating Machine: %s", err) + logger.Error(err, "Error updating Machine") } - klog.Infof("Successfully updated %s", updateMachine.Name) + logger.Info( + "Successfully updated machine", + "machine", updateMachine, + ) // Get the MachineSet name of the specific Machine var updateMachinesetName string = "" for k, v := range updateMachine.Labels { if k == "machine.openshift.io/cluster-api-machineset" { updateMachinesetName = v - klog.Infof("Machineset to update is %v", updateMachinesetName) + logger.Info( + "Machineset to be updated", + "machineSetName", updateMachinesetName, + ) } } if updateMachinesetName != "" { allMachineSet := machinev1beta1.MachineSetList{} if err := r.List(ctx, &allMachineSet); err != nil { - klog.Infof("Error listing MachineSets: %s", err) + logger.Error(err, "Error listing Machinesets") } for _, aMachineSet := range allMachineSet.Items { if aMachineSet.Name == updateMachinesetName { - klog.Infof("Existing machineset replicas %v", *aMachineSet.Spec.Replicas) + logger.Info( + "Scaling down MachineSet replicas", + "existingReplicas", *aMachineSet.Spec.Replicas, + ) // Scale down 1 replica per loop iteration newReplicas := *aMachineSet.Spec.Replicas - int32(1) updateMsReplicas := aMachineSet.DeepCopy() @@ -385,10 +435,13 @@ func (r *AppWrapperReconciler) removeMachinesBasedOnReplicas(ctx context.Context updateMsReplicas.Labels[fmt.Sprintf("instascale.codeflare.dev-%s-%s", aw.Name, aw.Namespace)] = strconv.FormatInt(int64(replicas), 10) if err := r.Update(ctx, updateMsReplicas); err != nil { - klog.Infof("Error updating MachineSet: %s", err) + logger.Error(err, "Error updating MachineSet") } - klog.Infof("Successfully removed node and updated MachineSet") - numberOfmachines = numberOfmachines - 1 + logger.Info( + "Successfully removed node and updated MachineSet", + "machineSet", updateMsReplicas, + ) + numberOfmachines = numberOfmachines - 1 // NOTE there is no reason to update this value here afaict return ctrl.Result{Requeue: true}, nil } @@ -403,6 +456,7 @@ func (r *AppWrapperReconciler) removeMachinesBasedOnReplicas(ctx context.Context } func (r *AppWrapperReconciler) annotateToDeleteMachine(ctx context.Context, aw *arbv1.AppWrapper) error { + logger := ctrl.LoggerFrom(ctx) // We get a list of Nodes with the AppWrapper name and namespace label := fmt.Sprintf("%s-%s", aw.Name, aw.Namespace) labelSelector := labels.SelectorFromSet(labels.Set(map[string]string{ @@ -422,10 +476,10 @@ func (r *AppWrapperReconciler) annotateToDeleteMachine(ctx context.Context, aw * machineName := strings.Split(value, "/") allMachines := machinev1beta1.MachineList{} - errm := r.List(ctx, &allMachines) - if errm != nil { - klog.Infof("Error listing machines: %v", errm) - return errm + err := r.List(ctx, &allMachines) + if err != nil { + logger.Error(err, "Error listing machines") + return err } for _, aMachine := range allMachines.Items { @@ -433,10 +487,14 @@ func (r *AppWrapperReconciler) annotateToDeleteMachine(ctx context.Context, aw * machinePhase := *aMachine.Status.Phase if machinePhase != "Deleting" { updateMachine := aMachine.DeepCopy() - klog.Infof("The machine name to be annotated %v", aMachine.Name) - klog.Infof("Filtered node name is %v", node.Name) + logger.Info( + "Updating machine annotation", + "machine", aMachine, + "node", node, + ) updateMachine.Annotations["machine.openshift.io/cluster-api-delete-machine"] = "true" if err := r.Update(ctx, updateMachine); err != nil { + logger.Error(err, "Error updating machine") return err } } @@ -450,7 +508,10 @@ func (r *AppWrapperReconciler) annotateToDeleteMachine(ctx context.Context, aw * } var replicaCount int32 for _, aMachineSet := range machineSets.Items { - klog.Infof("Machineset to update is %v", aMachineSet.Name) + logger.Info( + "Updating MachineSet", + "machineSet", aMachineSet, + ) value, ok := aMachineSet.Labels[awLabel] if ok { intValue, err := strconv.Atoi(value) @@ -478,10 +539,11 @@ func (r *AppWrapperReconciler) annotateToDeleteMachine(ctx context.Context, aw * func (r *AppWrapperReconciler) patchMachineLabels(ctx context.Context, oldAw *arbv1.AppWrapper, newAw *arbv1.AppWrapper, machineName string) error { // Retrieve the machine object + logger := ctrl.LoggerFrom(ctx) machine := &machinev1beta1.Machine{} err := r.Get(ctx, types.NamespacedName{Name: machineName, Namespace: namespaceToList}, machine) if err != nil { - klog.Infof("Error retrieving machine: %v", err) + logger.Error(err, "Error retrieving machine") return err } patchOps := []map[string]interface{}{ @@ -505,7 +567,7 @@ func (r *AppWrapperReconciler) patchMachineLabels(ctx context.Context, oldAw *ar // Apply the patch to remove the old label and add the new one err = r.Patch(ctx, machine, client.RawPatch(types.JSONPatchType, patchBytes)) if err != nil { - klog.Infof("Error removing label from machine: %v", err) + logger.Error(err, "Error removing label from machine") return err } return nil @@ -513,6 +575,7 @@ func (r *AppWrapperReconciler) patchMachineLabels(ctx context.Context, oldAw *ar func (r *AppWrapperReconciler) patchNodeLabels(ctx context.Context, oldAw *arbv1.AppWrapper, newAw *arbv1.AppWrapper, nodeName string) error { // Patch Operations for adding and deleting + logger := ctrl.LoggerFrom(ctx) patchOps := []map[string]interface{}{ { "op": "remove", @@ -533,7 +596,7 @@ func (r *AppWrapperReconciler) patchNodeLabels(ctx context.Context, oldAw *arbv1 _, err = r.kubeClient.CoreV1().Nodes().Patch(ctx, nodeName, types.JSONPatchType, patchBytes, metav1.PatchOptions{}) if err != nil { - klog.Infof("Error deleted label to machines %v", err) + logger.Error(err, "Error deleting label from machine") return err } @@ -541,6 +604,7 @@ func (r *AppWrapperReconciler) patchNodeLabels(ctx context.Context, oldAw *arbv1 } func (r *AppWrapperReconciler) addLabelToMachine(ctx context.Context, aw *arbv1.AppWrapper, machineName string) error { + logger := ctrl.LoggerFrom(ctx) labelPatch := fmt.Sprintf(`[{"op":"add","path":"/metadata/labels/%s-%s","value":"%s-%s" }]`, aw.Name, aw.Namespace, aw.Name, aw.Namespace) patchBytes := []byte(labelPatch) @@ -548,7 +612,7 @@ func (r *AppWrapperReconciler) addLabelToMachine(ctx context.Context, aw *arbv1. machine := &machinev1beta1.Machine{} err := r.Get(ctx, types.NamespacedName{Name: machineName, Namespace: namespaceToList}, machine) if err != nil { - klog.Infof("Error retrieving machine: %v", err) + logger.Error(err, "Error retrieving machine") return err } @@ -556,17 +620,18 @@ func (r *AppWrapperReconciler) addLabelToMachine(ctx context.Context, aw *arbv1. patch := client.RawPatch(types.JSONPatchType, patchBytes) err = r.Patch(ctx, machine, patch) if err != nil { - klog.Infof("Error adding label to machine: %v", err) + logger.Error(err, "Error adding label to machine") return err } return nil } func (r *AppWrapperReconciler) addLabelToNode(ctx context.Context, aw *arbv1.AppWrapper, nodeName string) error { + logger := ctrl.LoggerFrom(ctx) labelPatch := fmt.Sprintf(`[{"op":"add","path":"/metadata/labels/%s-%s","value":"%s-%s" }]`, aw.Name, aw.Namespace, aw.Name, aw.Namespace) _, err := r.kubeClient.CoreV1().Nodes().Patch(ctx, nodeName, types.JSONPatchType, []byte(labelPatch), metav1.PatchOptions{}) if err != nil { - klog.Infof("Error adding label to machine %v", err) + logger.Error(err, "Error adding label to machine") return err } return nil @@ -574,6 +639,7 @@ func (r *AppWrapperReconciler) addLabelToNode(ctx context.Context, aw *arbv1.App // add logic to swap out labels with new appwrapper label func (r *AppWrapperReconciler) swapNodeLabels(ctx context.Context, oldAw *arbv1.AppWrapper, newAw *arbv1.AppWrapper) error { + logger := ctrl.LoggerFrom(ctx) labelSelector := labels.SelectorFromSet(labels.Set(map[string]string{ oldAw.Name: oldAw.Name, })) @@ -581,20 +647,26 @@ func (r *AppWrapperReconciler) swapNodeLabels(ctx context.Context, oldAw *arbv1. LabelSelector: labelSelector, } allMachines := machinev1beta1.MachineList{} - errm := r.List(ctx, &allMachines, listOptions) - if errm != nil { - klog.Infof("Error listing machineset: %v", errm) - return errm + err := r.List(ctx, &allMachines, listOptions) + if err != nil { + logger.Error(err, "Error listing machineset") + return err } - //klog.Infof("Got all machines %v", allMachines) for _, machine := range allMachines.Items { nodeName := machine.Status.NodeRef.Name - klog.Infof("removing label from node %v that belonged to appwrapper %v and adding node to new appwrapper %v", nodeName, oldAw.Name, newAw.Name) + logger.Info( + "Changing appwrapper ownership for node", + "nodeName", nodeName, + "oldAppWrapper", oldAw, + "newAppWrapper", newAw, + ) if err := r.patchMachineLabels(ctx, oldAw, newAw, machine.Name); err != nil { + logger.Error(err, "Error patching machine labels") return err } if err := r.patchNodeLabels(ctx, oldAw, newAw, nodeName); err != nil { + logger.Error(err, "Error patching node labels") return err } } @@ -603,10 +675,11 @@ func (r *AppWrapperReconciler) swapNodeLabels(ctx context.Context, oldAw *arbv1. func (r *AppWrapperReconciler) removeMachineSetLabel(ctx context.Context, aw *arbv1.AppWrapper, machineSetName string) error { // Retrieve the machineSet object + logger := ctrl.LoggerFrom(ctx) machineSet := &machinev1beta1.MachineSet{} err := r.Get(ctx, types.NamespacedName{Name: machineSetName, Namespace: namespaceToList}, machineSet) if err != nil { - klog.Infof("Error retrieving MachineSet: %v", err) + logger.Error(err, "Error retrieving MachineSet") return err } @@ -623,13 +696,14 @@ func (r *AppWrapperReconciler) removeMachineSetLabel(ctx context.Context, aw *ar patch := client.RawPatch(types.JSONPatchType, patchBytes) err = r.Patch(ctx, machineSet, patch) if err != nil { - klog.Infof("Error removing label from MachineSet: %v", err) + logger.Error(err, "Error removing label from MachineSet") return err } return nil } func (r *AppWrapperReconciler) deleteMachineSet(ctx context.Context, aw *arbv1.AppWrapper) error { + logger := ctrl.LoggerFrom(ctx) labelSelector := labels.SelectorFromSet(labels.Set(map[string]string{ "instascale.codeflare.dev-aw": fmt.Sprintf("%s-%s", aw.Name, aw.Namespace), })) @@ -640,14 +714,17 @@ func (r *AppWrapperReconciler) deleteMachineSet(ctx context.Context, aw *arbv1.A allMachineSet := machinev1beta1.MachineSetList{} err := r.List(ctx, &allMachineSet, listOptions) if err != nil { - klog.Infof("Error listing MachineSets: %v", err) + logger.Error(err, "Error listing MachineSets") return err } for _, aMachineSet := range allMachineSet.Items { - klog.Infof("Deleting machineset named %v", aMachineSet.Name) + logger.Info( + "Deleting MachineSet", + "machineSet", aMachineSet, + ) err := r.Delete(ctx, &aMachineSet) if err != nil { - klog.Infof("Failed to delete machine set: %v", err) + logger.Error(err, "Failed to delete machine set") return err } } diff --git a/controllers/utils.go b/controllers/utils.go index c827b04..e2777c6 100644 --- a/controllers/utils.go +++ b/controllers/utils.go @@ -1,6 +1,7 @@ package controllers import ( + "context" "encoding/json" "fmt" "math/rand" @@ -8,7 +9,7 @@ import ( machinev1 "github.com/openshift/api/machine/v1beta1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/klog" + ctrl "sigs.k8s.io/controller-runtime" ) func resyncPeriod() func() time.Duration { @@ -19,7 +20,8 @@ func resyncPeriod() func() time.Duration { } // ProviderSpecFromRawExtension unmarshals the JSON-encoded spec -func ProviderSpecFromRawExtension(rawExtension *runtime.RawExtension) (*machinev1.AWSMachineProviderConfig, error) { +func ProviderSpecFromRawExtension(ctx context.Context, rawExtension *runtime.RawExtension) (*machinev1.AWSMachineProviderConfig, error) { + logger := ctrl.LoggerFrom(ctx) if rawExtension == nil { return &machinev1.AWSMachineProviderConfig{}, nil } @@ -29,7 +31,10 @@ func ProviderSpecFromRawExtension(rawExtension *runtime.RawExtension) (*machinev return nil, fmt.Errorf("error unmarshalling providerSpec: %v", err) } - klog.V(5).Infof("Got provider spec from raw extension: %+v", spec) + logger.V(5).Info( + "Got provider spec from raw extension", + "awsMachineProviderConfig", spec, + ) return spec, nil } diff --git a/controllers/utils_test.go b/controllers/utils_test.go index 5d0fb21..414c253 100644 --- a/controllers/utils_test.go +++ b/controllers/utils_test.go @@ -1,9 +1,11 @@ package controllers import ( + "context" "testing" "fmt" + "github.com/onsi/gomega" machinev1 "github.com/openshift/api/machine/v1beta1" @@ -47,7 +49,7 @@ func TestProviderSpecFromRawExtension(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - result, err := ProviderSpecFromRawExtension(tt.rawExtension) + result, err := ProviderSpecFromRawExtension(context.TODO(), tt.rawExtension) if err != nil { g.Expect(err).To(gomega.Equal(tt.wantErr)) } else { diff --git a/go.mod b/go.mod index 7ce011b..85a5940 100644 --- a/go.mod +++ b/go.mod @@ -6,12 +6,10 @@ require ( github.com/onsi/gomega v1.27.4 github.com/openshift-online/ocm-sdk-go v0.1.327 github.com/openshift/api v0.0.0-20220411210816-c3bb724c282a - github.com/openshift/client-go v0.0.0-20211209144617-7385dd6338e3 github.com/project-codeflare/multi-cluster-app-dispatcher v1.38.1 k8s.io/api v0.26.2 k8s.io/apimachinery v0.26.2 k8s.io/client-go v0.26.2 - k8s.io/klog v1.0.0 sigs.k8s.io/controller-runtime v0.14.6 ) diff --git a/go.sum b/go.sum index 23215df..6114e27 100644 --- a/go.sum +++ b/go.sum @@ -13,11 +13,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -36,13 +31,6 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= @@ -78,7 +66,6 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= @@ -103,7 +90,6 @@ github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRr github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -113,8 +99,6 @@ github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQL github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -176,7 +160,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -192,13 +175,11 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -208,8 +189,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= @@ -219,7 +198,6 @@ github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181127221834-b4f47329b966/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -228,10 +206,6 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -246,14 +220,12 @@ github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/itchyny/gojq v0.12.7 h1:hYPTpeWfrJ1OT+2j6cvBScbhl0TkdwGM4bc66onUSOQ= @@ -394,14 +366,9 @@ github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= github.com/openshift-online/ocm-sdk-go v0.1.327 h1:WR822bGdQoMuZ2+dFdhZz3fpD2NlJhGr+F3FJPXvqFU= github.com/openshift-online/ocm-sdk-go v0.1.327/go.mod h1:KYOw8kAKAHyPrJcQoVR82CneQ4ofC02Na4cXXaTq4Nw= -github.com/openshift/api v0.0.0-20211209135129-c58d9f695577/go.mod h1:DoslCwtqUpr3d/gsbq4ZlkaMEdYqKxuypsDjorcHhME= github.com/openshift/api v0.0.0-20220411210816-c3bb724c282a h1:vHa6OYOwLWMod4uwR59Ias5q/KVT4MI5kSEpHlXx5hs= github.com/openshift/api v0.0.0-20220411210816-c3bb724c282a/go.mod h1:F/eU6jgr6Q2VhMu1mSpMmygxAELd7+BUxs3NHZ25jV4= -github.com/openshift/build-machinery-go v0.0.0-20210712174854-1bb7fd1518d3/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/build-machinery-go v0.0.0-20211213093930-7e33a7eb4ce3/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= -github.com/openshift/client-go v0.0.0-20211209144617-7385dd6338e3 h1:SG1aqwleU6bGD0X4mhkTNupjVnByMYYuW4XbnCPavQU= -github.com/openshift/client-go v0.0.0-20211209144617-7385dd6338e3/go.mod h1:cwhyki5lqBmrT0m8Im+9I7PGFaraOzcYPtEz93RcsGY= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -485,8 +452,6 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -517,11 +482,9 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= @@ -547,7 +510,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -556,8 +518,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -593,12 +553,7 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -617,14 +572,7 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -680,18 +628,10 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -710,7 +650,6 @@ golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= @@ -728,7 +667,6 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -780,14 +718,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= @@ -816,11 +748,6 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -859,17 +786,7 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -883,13 +800,8 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -949,15 +861,12 @@ k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwT k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/apimachinery v0.26.2 h1:da1u3D5wfR5u2RpLhE/ZtZS2P7QvDgLZTi9wrNZl/tQ= k8s.io/apimachinery v0.26.2/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= k8s.io/client-go v0.26.2 h1:s1WkVujHX3kTp4Zn4yGNFK+dlDXy1bAAkIl+cFAiuYI= k8s.io/client-go v0.26.2/go.mod h1:u5EjOuSyBa09yqqyY7m3abZeovO/7D/WehVVlZ2qcqU= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= k8s.io/component-base v0.26.2 h1:IfWgCGUDzrD6wLLgXEstJKYZKAFS2kO+rBRi0p3LqcI= k8s.io/component-base v0.26.2/go.mod h1:DxbuIe9M3IZPRxPIzhch2m1eT7uFrSBJUBuVCQEBivs= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= diff --git a/main.go b/main.go index 839a470..876b627 100644 --- a/main.go +++ b/main.go @@ -49,7 +49,7 @@ import ( var ( scheme = runtime.NewScheme() - setupLog = ctrl.Log.WithName("setup") + setupLog = ctrl.Log.WithName("instascale").WithName("setup") ) // +kubebuilder:rbac:groups="",resources=secrets,resourceNames=instascale-ocm-secret,verbs=get