Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
0e36568
CSPL-3551 Init IngestorCluster CR implementation
kasiakoziol Jul 24, 2025
2cca0d7
CSPL-3551 Enhancing Ingestor inputs
kasiakoziol Jul 25, 2025
f747ab4
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Jul 29, 2025
9a7503c
fix
kasiakoziol Jul 29, 2025
7134350
fix
kasiakoziol Jul 29, 2025
44349fa
CSPL-3551 Adding tests
kasiakoziol Jul 29, 2025
e71ea9c
CSPL-3551 Mound defaults and update them with no Splunk restart
kasiakoziol Jul 31, 2025
14ccef4
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Jul 31, 2025
8876d0e
CSPL-3551 Fixing code after tests
kasiakoziol Aug 1, 2025
5c31cab
CSPL-3895-indexercluster (#1562)
Igor-splunk Aug 7, 2025
0c9e908
CSPL-3551 Applying fixes do Indexer integration
kasiakoziol Aug 7, 2025
89f9eb4
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Aug 11, 2025
d885a73
CSPL-3551 Fixes
kasiakoziol Aug 11, 2025
56aa780
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Aug 18, 2025
1c77634
CSPL-3551 Fixes
kasiakoziol Aug 19, 2025
fb4e87f
CSPL-3560 Initial docs for I&I separation
kasiakoziol Aug 26, 2025
3e376d8
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Aug 29, 2025
e62f381
CSPL-3551 Update documentation to reflect on Grafana
kasiakoziol Sep 1, 2025
84d8491
CSPL-3556 Unit tests
kasiakoziol Sep 10, 2025
c3b3aa6
CSPL-3972 Addressing TODOs
kasiakoziol Sep 11, 2025
2af9061
CSPL-3972 Addressing TODOs
kasiakoziol Sep 11, 2025
053352d
CSPL-3551 Moving default from types to controller code
kasiakoziol Sep 11, 2025
e844286
CSPL-3551 Applying previous changes to IndexerCluster
kasiakoziol Sep 18, 2025
500cdfa
CSPL-3551 Moving validations to separate function and adding validati…
kasiakoziol Sep 19, 2025
4b064a6
CSPL-3551 Making sure all inputs are put into status
kasiakoziol Sep 19, 2025
9c6cd69
CSPL-3551 Update of conf files when queue name or type change
kasiakoziol Sep 22, 2025
759b09b
CSPL-3551 Unit tests
kasiakoziol Sep 23, 2025
20d9d6c
CSPL-4003 Helm charts support for bus and pipeline configs
kasiakoziol Sep 29, 2025
f9fb45a
CSPL-4003 Docs update
kasiakoziol Oct 1, 2025
c5e4c2b
CSPL-4003 Addressing comments
kasiakoziol Oct 2, 2025
2de618a
CSPL-3558 Integ tests init
kasiakoziol Oct 2, 2025
0393139
CSPL-3558 Adding extra validation for integraion test
kasiakoziol Oct 2, 2025
4d3865c
CSPL-3558 Refactoring
kasiakoziol Oct 2, 2025
c354062
CSPL-3558 Adding scenario for update and delete
kasiakoziol Oct 3, 2025
c204d52
CSPL-3558 Adding helm test
kasiakoziol Oct 3, 2025
027c039
CSPL-3558 Update of k8s version
kasiakoziol Oct 3, 2025
c5a97dc
CSPL-3558 Fix metrics-server installation issues after k8s version up…
kasiakoziol Oct 6, 2025
fc28db0
CSPL-3558 Adding additional tests
kasiakoziol Oct 7, 2025
a7ae40f
CSPL-3558 Fixing helm tests
kasiakoziol Oct 9, 2025
d3b2ad6
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Oct 13, 2025
3325113
Merge branch 'CSPL-3551-ingestion-cr' into feature/CSPL-3551-ingestio…
kasiakoziol Oct 13, 2025
13b8f4f
Merge branch 'feature/CSPL-3551-ingestion-cr-todos' into feature/CSPL…
kasiakoziol Oct 13, 2025
4622102
CSPL-3558 Fix tests after merge
kasiakoziol Oct 13, 2025
9fbcb4a
CSPL-3558 Fix helm tests
kasiakoziol Oct 16, 2025
7480ed8
CSPL-4022 Remove pipeline config from inputs
kasiakoziol Oct 17, 2025
d21a9a3
CSPL-4022 Remove bus inputs
kasiakoziol Oct 20, 2025
7edb81b
CSPL-4022 Introduce BusConfiguration CR
kasiakoziol Oct 22, 2025
a5b2db3
CSPL-4022 Update docs and tests
kasiakoziol Oct 22, 2025
9f57abc
CSPL-4022 Update ns reference for BusConfiguration
kasiakoziol Oct 23, 2025
10a4fc0
CSPL-4022 Fixing tests and adding bus config to ingestor controller
kasiakoziol Oct 23, 2025
db02bfd
CSPL-4022 Fix update behaviour
kasiakoziol Oct 23, 2025
ceb2c71
CSPL-4022 Docs update
kasiakoziol Oct 27, 2025
6618a3f
Merge pull request #1600 from splunk/feature/CSPL-4022-move-inputs-to-cr
kasiakoziol Oct 28, 2025
d7f367b
CSPL-4022 Fix failing tests
kasiakoziol Oct 28, 2025
25b76a3
Merge pull request #1593 from splunk/feature/CSPL-3558-integ-tests
kasiakoziol Oct 28, 2025
c6cea58
Merge pull request #1576 from splunk/feature/CSPL-3551-ingestion-cr-t…
kasiakoziol Oct 28, 2025
192d3bf
CSPL-4022 Fix tests
kasiakoziol Oct 29, 2025
c6972f7
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Oct 29, 2025
cfd3cd7
CSPL-4022 Addressing PR comments
kasiakoziol Oct 29, 2025
5843632
CSPL-4022 Address comments
kasiakoziol Oct 29, 2025
4e37060
CSPL-4022 Fix helm tests
kasiakoziol Oct 29, 2025
5dd2edc
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Dec 3, 2025
c1ad439
CSPL-4358 Splitting BusConfiguration into Bus and LargeMessageStore
kasiakoziol Dec 12, 2025
cb8daf2
CSPL-4358 Update docs
kasiakoziol Dec 12, 2025
61c0387
CSPL-4358 Addressing comments
kasiakoziol Dec 12, 2025
3eb98f7
CSPL-4358 Adding more validations
kasiakoziol Dec 15, 2025
254cbf0
CSPL-4360 Secret reference added for Bus CR
kasiakoziol Dec 16, 2025
f992c40
CSPL-4360 Fix failing tests
kasiakoziol Dec 16, 2025
143dbe0
CSPL-4360 Add Splunk restart
kasiakoziol Dec 16, 2025
3c7b2d7
CSPL-4360 Fix failing tests
kasiakoziol Dec 16, 2025
e4e083a
CSPL-4360 Fix failing tests
kasiakoziol Dec 17, 2025
3cb9148
CSPL-4360 Fix errors with failing validation on status
kasiakoziol Dec 17, 2025
ba73a87
CSPL-4358 Rename Bus to Queue
kasiakoziol Dec 19, 2025
b6f5b0b
CSPL-4358 Rename LargeMessageStore to ObjectStorage
kasiakoziol Dec 19, 2025
607632f
CSPL-4358 Making region authRegion and optional, simplifying endpoint
kasiakoziol Dec 19, 2025
30a82c6
Merge branch 'feature/CSPL-4358-split-bus-into-2-crs' into feature/CS…
kasiakoziol Dec 19, 2025
fafed27
CSPL-4360 Fixing tests after merge
kasiakoziol Dec 19, 2025
e0a10ba
CSPL-4360 Fix validation that fails for status
kasiakoziol Dec 19, 2025
155b21a
CSPL-4360 Fix failing to get k8s secret
kasiakoziol Dec 19, 2025
f8afd5a
CSPL-4360 Fix failing integ and helm tests
kasiakoziol Dec 22, 2025
47d1a35
CSPL-4360 Fixing failing tests due to incorrect secret ref
kasiakoziol Jan 8, 2026
532ca28
CSPL-4360 Addressing comments
kasiakoziol Jan 13, 2026
5c6e786
CSPL-4360 Addressing secret value change and removing redundant contr…
kasiakoziol Jan 13, 2026
42dc8e8
CSPL-4360 Update of docs, helm tests and validations
kasiakoziol Jan 13, 2026
c50984b
CSPL-4360 Add secret watch and fix controller tests
kasiakoziol Jan 13, 2026
e81280c
CSPL-4360 Update docs
kasiakoziol Jan 28, 2026
d29aed1
CSPL-4360 Restart Splunk when SA changed
kasiakoziol Jan 29, 2026
52ff612
Merge pull request #1649 from splunk/feature/CSPL-4360-secret-ref-ing…
kasiakoziol Feb 9, 2026
4ebe9d8
Addressing comments
kasiakoziol Feb 9, 2026
e95f0c5
Merge pull request #1643 from splunk/feature/CSPL-4358-split-bus-into…
kasiakoziol Feb 10, 2026
d768efa
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Feb 10, 2026
ed76ae9
Addressing changes from recent PRs
kasiakoziol Feb 10, 2026
03bce3d
Formatting fix
kasiakoziol Feb 10, 2026
e32487f
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Feb 11, 2026
7d7a55e
Addressing PR comments
kasiakoziol Feb 11, 2026
538770a
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Feb 12, 2026
7c6409c
Address comments
kasiakoziol Feb 12, 2026
cdc7e40
Addressing comments
kasiakoziol Feb 12, 2026
c086d58
Fix pipeline issues
kasiakoziol Feb 12, 2026
2bb94bc
Reverting
kasiakoziol Feb 12, 2026
389a3ea
Refactoring according to comments
kasiakoziol Feb 13, 2026
24ed789
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Feb 13, 2026
c6fbe46
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Feb 13, 2026
4f4b5d7
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Feb 18, 2026
f02d02c
CSPL-4513 Refactoring of existing events
kasiakoziol Feb 18, 2026
1227b29
CSPL-4513 Adding events and tests for them for Index & Ingestion sepa…
kasiakoziol Feb 18, 2026
9db1784
Fix formatting issues
kasiakoziol Feb 18, 2026
f4b68cf
Logs
kasiakoziol Feb 18, 2026
3098f32
Merge branch 'develop' into CSPL-3551-ingestion-cr
kasiakoziol Feb 18, 2026
0fb0e6f
Fmt fix
kasiakoziol Feb 18, 2026
f0410e4
Merge branch 'CSPL-3551-ingestion-cr' into feature/cspl-4513-events-f…
kasiakoziol Feb 18, 2026
6e7a718
CSPL-4513 Extra logs
kasiakoziol Feb 19, 2026
029e2f6
CSPL-4513 Moving to slog and extra tests
kasiakoziol Feb 19, 2026
c4b5ad3
CSPL-4513 Fixing ScaledUp/Down events
kasiakoziol Feb 20, 2026
7bef9e3
CSPL-4002 Update Ansible role to ingestor (from standalone) for Inges…
kasiakoziol Feb 20, 2026
7b5154f
Merge branch 'CSPL-3551-ingestion-cr' into feature/cspl-4513-events-f…
kasiakoziol Feb 20, 2026
e7504b7
Merge branch 'develop' into feature/cspl-4513-events-for-index-ingest…
kasiakoziol Feb 20, 2026
14d99b5
CSPL-4513 Address comments
kasiakoziol Feb 23, 2026
2fa9090
Merge branch 'develop' into feature/cspl-4513-events-for-index-ingest…
kasiakoziol Feb 24, 2026
cb7d7f7
Merge branch 'develop' into feature/cspl-4513-events-for-index-ingest…
kasiakoziol Feb 26, 2026
f807ffc
Merge branch 'feature/slog-as-default-logger' into feature/cspl-4513-…
kasiakoziol Feb 26, 2026
10d7853
CSPL-4513 Addressing Igor's changes
kasiakoziol Feb 26, 2026
2e7f07f
Merge branch 'feature/slog-as-default-logger' into feature/cspl-4513-…
kasiakoziol Feb 26, 2026
e38af25
Merge branch 'feature/slog-as-default-logger' into feature/cspl-4513-…
kasiakoziol Feb 27, 2026
30c2546
Fix
kasiakoziol Feb 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,11 @@ import (
"path/filepath"
"time"

"sigs.k8s.io/controller-runtime/pkg/metrics/filters"

intController "github.com/splunk/splunk-operator/internal/controller"
"github.com/splunk/splunk-operator/internal/controller/debug"
"github.com/splunk/splunk-operator/pkg/config"
"github.com/splunk/splunk-operator/pkg/logging"
"github.com/splunk/splunk-operator/pkg/splunk/enterprise/validation"
"sigs.k8s.io/controller-runtime/pkg/certwatcher"

// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
Expand All @@ -47,14 +44,15 @@ import (
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
_ "k8s.io/client-go/plugin/pkg/client/auth"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/certwatcher"
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/metrics/filters"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

enterpriseApiV3 "github.com/splunk/splunk-operator/api/v3"
enterpriseApi "github.com/splunk/splunk-operator/api/v4"
"github.com/splunk/splunk-operator/internal/controller"
//+kubebuilder:scaffold:imports
//extapi "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
)
Expand Down Expand Up @@ -299,7 +297,7 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "Standalone")
os.Exit(1)
}
if err := (&controller.IngestorClusterReconciler{
if err := (&intController.IngestorClusterReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Recorder: mgr.GetEventRecorderFor("ingestorcluster-controller"),
Expand Down
19 changes: 9 additions & 10 deletions pkg/splunk/client/enterprise.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ package client

import (
"bytes"
"context"
"crypto/tls"
"encoding/json"
"fmt"
"io"
"log/slog"
"net/http"
"regexp"
"strconv"
"strings"
"time"

"github.com/go-logr/logr"
splcommon "github.com/splunk/splunk-operator/pkg/splunk/common"
)

Expand Down Expand Up @@ -1035,23 +1036,22 @@ func (c *SplunkClient) RestartSplunk() error {

// Updates conf files and their properties
// See https://help.splunk.com/en/splunk-enterprise/leverage-rest-apis/rest-api-reference/10.0/configuration-endpoints/configuration-endpoint-descriptions
func (c *SplunkClient) UpdateConfFile(scopedLog logr.Logger, fileName, property string, propertyKVList [][]string) error {
func (c *SplunkClient) UpdateConfFile(ctx context.Context, logger *slog.Logger, fileName, property string, propertyKVList [][]string) error {
// Creates an object in a conf file if it doesn't exist
endpoint := fmt.Sprintf("%s/servicesNS/nobody/system/configs/conf-%s", c.ManagementURI, fileName)
body := fmt.Sprintf("name=%s", property)

scopedLog.Info("Creating conf file object if it does not exist", "fileName", fileName, "property", property)
logger.InfoContext(ctx, "Creating conf file object if it does not exist", "fileName", fileName, "property", property)
request, err := http.NewRequest("POST", endpoint, strings.NewReader(body))
if err != nil {
scopedLog.Error(err, "Failed to create conf file object if it does not exist", "fileName", fileName, "property", property)
logger.ErrorContext(ctx, "Failed to create conf file object if it does not exist", "fileName", fileName, "property", property, "error", err.Error())
return err
}

scopedLog.Info("Validating conf file object creation", "fileName", fileName, "property", property)
expectedStatus := []int{200, 201, 409}
err = c.Do(request, expectedStatus, nil)
if err != nil {
scopedLog.Error(err, fmt.Sprintf("Status not in %v for conf file object creation", expectedStatus), "fileName", fileName, "property", property)
logger.ErrorContext(ctx, fmt.Sprintf("Status not in %v for conf file object creation", expectedStatus), "fileName", fileName, "property", property, "error", err.Error())
return err
}

Expand All @@ -1065,18 +1065,17 @@ func (c *SplunkClient) UpdateConfFile(scopedLog logr.Logger, fileName, property
body = body[:len(body)-1]
}

scopedLog.Info("Updating conf file object", "fileName", fileName, "property", property, "body", body)
logger.DebugContext(ctx, "Updating conf file object", "fileName", fileName, "property", property)
request, err = http.NewRequest("POST", endpoint, strings.NewReader(body))
if err != nil {
scopedLog.Error(err, "Failed to update conf file object", "fileName", fileName, "property", property, "body", body)
logger.ErrorContext(ctx, "Failed to update conf file object", "fileName", fileName, "property", property, "error", err.Error())
return err
}

scopedLog.Info("Validating conf file object update", "fileName", fileName, "property", property)
expectedStatus = []int{200, 201}
err = c.Do(request, expectedStatus, nil)
if err != nil {
scopedLog.Error(err, fmt.Sprintf("Status not in %v for conf file object update", expectedStatus), "fileName", fileName, "property", property, "body", body)
logger.ErrorContext(ctx, fmt.Sprintf("Status not in %v for conf file object update", expectedStatus), "fileName", fileName, "property", property, "error", err.Error())
}
return err
}
12 changes: 6 additions & 6 deletions pkg/splunk/client/enterprise_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"strings"
"testing"

"github.com/splunk/splunk-operator/pkg/logging"
splcommon "github.com/splunk/splunk-operator/pkg/splunk/common"
"sigs.k8s.io/controller-runtime/pkg/log"

spltest "github.com/splunk/splunk-operator/pkg/splunk/test"
)
Expand Down Expand Up @@ -704,8 +704,8 @@ func TestUpdateConfFile(t *testing.T) {
value := "myvalue"
fileName := "outputs"

reqLogger := log.FromContext(context.TODO())
scopedLog := reqLogger.WithName("TestUpdateConfFile")
ctx := context.TODO()
logger := logging.FromContext(ctx).With("func", "TestUpdateConfFile", "name", "test", "namespace", "test")

// First request: create the property (object) if it doesn't exist
createBody := strings.NewReader(fmt.Sprintf("name=%s", property))
Expand All @@ -722,7 +722,7 @@ func TestUpdateConfFile(t *testing.T) {
c := NewSplunkClient("https://localhost:8089", "admin", "p@ssw0rd")
c.Client = mockSplunkClient

err := c.UpdateConfFile(scopedLog, fileName, property, [][]string{{key, value}})
err := c.UpdateConfFile(ctx, logger, fileName, property, [][]string{{key, value}})
if err != nil {
t.Errorf("UpdateConfFile err = %v", err)
}
Expand All @@ -732,7 +732,7 @@ func TestUpdateConfFile(t *testing.T) {
mockSplunkClient = &spltest.MockHTTPClient{}
mockSplunkClient.AddHandler(wantCreateRequest, 500, "", nil)
c.Client = mockSplunkClient
err = c.UpdateConfFile(scopedLog, fileName, property, [][]string{{key, value}})
err = c.UpdateConfFile(ctx, logger, fileName, property, [][]string{{key, value}})
if err == nil {
t.Errorf("UpdateConfFile expected error on create, got nil")
}
Expand All @@ -742,7 +742,7 @@ func TestUpdateConfFile(t *testing.T) {
mockSplunkClient.AddHandler(wantCreateRequest, 201, "", nil)
mockSplunkClient.AddHandler(wantUpdateRequest, 500, "", nil)
c.Client = mockSplunkClient
err = c.UpdateConfFile(scopedLog, fileName, property, [][]string{{key, value}})
err = c.UpdateConfFile(ctx, logger, fileName, property, [][]string{{key, value}})
if err == nil {
t.Errorf("UpdateConfFile expected error on update, got nil")
}
Expand Down
Loading
Loading