Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jswoods committed Sep 3, 2024
1 parent 87bdbd2 commit 93c70fc
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 4 deletions.
203 changes: 203 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

2 changes: 1 addition & 1 deletion controllers/humioaggregatealert_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (r *HumioAggregateAlertReconciler) Reconcile(ctx context.Context, req ctrl.

r.Log = r.Log.WithValues("Request.UID", haa.UID)

cluster, err := helpers.NewCluster(ctx, r, haa.Spec.ManagedClusterName, haa.Spec.ExternalClusterName, haa.Namespace, helpers.UseCertManager(), true)
cluster, err := helpers.NewCluster(ctx, r, haa.Spec.ManagedClusterName, haa.Spec.ExternalClusterName, haa.Namespace, helpers.UseCertManager(), true, false)
if err != nil || cluster == nil || cluster.Config() == nil {
setStateErr := r.setState(ctx, humiov1alpha1.HumioAggregateAlertStateConfigError, haa)
if setStateErr != nil {
Expand Down
2 changes: 1 addition & 1 deletion controllers/humioscheduledsearch_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (r *HumioScheduledSearchReconciler) Reconcile(ctx context.Context, req ctrl

r.Log = r.Log.WithValues("Request.UID", hss.UID)

cluster, err := helpers.NewCluster(ctx, r, hss.Spec.ManagedClusterName, hss.Spec.ExternalClusterName, hss.Namespace, helpers.UseCertManager(), true)
cluster, err := helpers.NewCluster(ctx, r, hss.Spec.ManagedClusterName, hss.Spec.ExternalClusterName, hss.Namespace, helpers.UseCertManager(), true, false)
if err != nil || cluster == nil || cluster.Config() == nil {
setStateErr := r.setState(ctx, humiov1alpha1.HumioScheduledSearchStateConfigError, hss)
if setStateErr != nil {
Expand Down
5 changes: 3 additions & 2 deletions controllers/suite/clusters/humiocluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ package clusters
import (
"context"
"fmt"
cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1"
"os"
"reflect"
"strings"

cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1"

humiov1alpha1 "github.com/humio/humio-operator/api/v1alpha1"
"github.com/humio/humio-operator/controllers"
"github.com/humio/humio-operator/controllers/suite"
Expand Down Expand Up @@ -1287,7 +1288,7 @@ var _ = Describe("HumioCluster Controller", func() {

suite.UsingClusterBy(key.Name, "Creating a cluster")
ctx := context.Background()
suite.CreateAndBootstrapCluster(ctx, k8sClient, humioClientForTestSuite, toCreate, true, humiov1alpha1.HumioClusterStateRunning, testTimeout)
suite.CreateAndBootstrapCluster(ctx, k8sClient, testHumioClient, toCreate, true, humiov1alpha1.HumioClusterStateRunning, testTimeout)
defer suite.CleanupCluster(ctx, k8sClient, toCreate)

suite.UsingClusterBy(key.Name, "Validating pod bootstrap token annotation hash")
Expand Down

0 comments on commit 93c70fc

Please sign in to comment.