Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Dec 12, 2024
1 parent a4ae065 commit ff9ea1b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ OPM ?= $(LOCALBIN)/opm

## Tool Versions
CERT_MANAGER_VERSION ?= v1.14.7
KUSTOMIZE_VERSION ?= v5.4.2
KUSTOMIZE_VERSION ?= v5.5.0
CONTROLLER_TOOLS_VERSION ?= v0.15.0
OPERATOR_SDK_VERSION ?= 1.35.0
HELM_VERSION ?= 3.14.2
OPM_VERSION ?= 1.38.0
GOLINT_VERSION ?= 1.60.3
GOLINT_VERSION ?= 1.62.2

.PHONY: cert-manager
cert-manager: ## Install cert-manager to the cluster
Expand Down
7 changes: 5 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,16 @@ func main() {
os.Exit(1)
}

mgr.GetCache().IndexField(ctx, &corev1.Event{}, "involvedObject.name", func(obj client.Object) []string {
if err := mgr.GetCache().IndexField(ctx, &corev1.Event{}, "involvedObject.name", func(obj client.Object) []string {
event := obj.(*corev1.Event)
if event.InvolvedObject.Kind == "Pod" {
return []string{event.InvolvedObject.Name}
}
return []string{}
})
}); err != nil {
setupLog.Error(err, "unable to set up event index")
os.Exit(1)
}

setupLog.Info("starting manager")
if err := mgr.Start(ctx); err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ var _ = Describe(testName, func() {
json := `jsonpath={.status.conditions[?(@.type=="PodScheduled")].status}`
k = kubectl.Get(fmt.Sprintf("pod/%s-%s-r1-sts-0", clusterName, dcName)).
FormatOutput(json)
ns.WaitForOutputContains(k, "False", 30)
Expect(ns.WaitForOutputContains(k, "False", 30)).ToNot(HaveOccurred())

json = `jsonpath={.status.conditions[?(@.type=="PodScheduled")].reason}`
k = kubectl.Get(fmt.Sprintf("pod/%s-%s-r1-sts-0", clusterName, dcName)).
Expand Down

0 comments on commit ff9ea1b

Please sign in to comment.