Skip to content

Conversation

@Igor-splunk
Copy link
Collaborator

@Igor-splunk Igor-splunk commented Apr 14, 2025

v1.33 migration
v1.34 migration
v1.36 migration
v1.38 migration
v1.39 migration

Changes related to the OperatorSDK upgrade:

  • Perform upgrade from OperatorSDK v1.31.0 to v1.39
  • Adjust Operator structure (folders, file names etc)
  • Update Golang version from 1.23.0 to 1.24.2
  • Reimplement deprecated functionspredicate.GenerationChangedPredicate{} and predicate.AnnotationChangedPredicate{}, for predicate

Other changes

  • Fix SPLUNK_ENTERPRISE_IMAGE var value
  • Fix tests' stability

@coveralls
Copy link
Collaborator

coveralls commented Apr 14, 2025

Pull Request Test Coverage Report for Build 15969470039

Details

  • 238 of 242 (98.35%) changed or added relevant lines in 13 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.07%) to 86.711%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/splunk/enterprise/upgrade.go 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/splunk/enterprise/afwscheduler.go 1 92.96%
Totals Coverage Status
Change from base Build 15887396749: 0.07%
Covered Lines: 10629
Relevant Lines: 12258

💛 - Coveralls

@Igor-splunk Igor-splunk changed the title Draft:CSPL-3675 Draft:CSPL-3675 Update Operator-SDK to v1.39 Apr 15, 2025
igor.grzankowski added 2 commits April 16, 2025 14:31
cmd/main.go Outdated
}

if err = (&controllers.ClusterMasterReconciler{
if err = (&controller2.ClusterMasterReconciler{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to splunk-controller instead.

err = ctrl.Watch(
source.Kind(mgr.GetCache(), instance, &handler.TypedEnqueueRequestForObject[splcommon.MetaObject]{}),
)
//err = ctrl.Watch(&source.Kind{Type: instance}, &handler.EnqueueRequestForObject{})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented line if not needed.

@Igor-splunk Igor-splunk changed the title Draft:CSPL-3675 Update Operator-SDK to v1.39 CSPL-3675 Update Operator-SDK to v1.39 Jun 17, 2025
Copy link
Collaborator

@kasiakoziol kasiakoziol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove branch from integ tests pipeline on merge

@kasiakoziol kasiakoziol force-pushed the CSPL-3675-operator-sdk branch from 2a20504 to aabe029 Compare June 25, 2025 09:16
@kasiakoziol kasiakoziol force-pushed the CSPL-3675-operator-sdk branch from e813abe to 6547244 Compare June 26, 2025 14:20
@kasiakoziol kasiakoziol requested a review from Copilot June 27, 2025 10:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the Operator SDK to v1.39 and updates related APIs, generated code, and CRDs to match new SDK requirements.

  • Update RESTClientForGVK calls to include an http.Client parameter
  • Replace deprecated MetricsBindAddress with the new server.Options API
  • Switch from ResourceRequirements to VolumeResourceRequirements for PVCs (requires verification)
  • Rename the controller package imports to splkcontroller across code and tests
  • Bump go.mod and regenerate CRDs with x-kubernetes-list-type: atomic and additional fields

Reviewed Changes

Copilot reviewed 91 out of 98 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/testenv/verificationutils.go Added stabilization sleep and StabilizationDuration constant (missing import)
test/testenv/util.go Introduced DumpGetSecrets and changed PVC resources type
pkg/splunk/enterprise/configuration.go Changed PVC resources type
test/testenv/testenv.go Updated manager Metrics options
go.mod Bumped Go version and updated SDK and dependency versions
Comments suppressed due to low confidence (4)

test/testenv/util.go:740

  • [nitpick] The comment says "list of pods" but this function is fetching secrets. Update the comment to accurately describe that it lists secrets.
// DumpGetSecrets prints and returns list of pods in the namespace

test/testenv/verificationutils.go:36

  • The time package is not imported, causing a compile error. Add import "time" at the top of the file.
var StabilizationDuration = time.Second * 20

test/testenv/util.go:527

  • There is no corev1.VolumeResourceRequirements type in Kubernetes API; it should remain corev1.ResourceRequirements to define PVC resource requests.
			Resources: corev1.VolumeResourceRequirements{

pkg/splunk/enterprise/configuration.go:142

  • Incorrect use of corev1.VolumeResourceRequirements—this type does not exist. Use corev1.ResourceRequirements for PVC specs.
				Resources: corev1.VolumeResourceRequirements{


output, err := exec.Command("kubectl", "get", "secrets", "-n", ns).Output()
if err != nil {
return nil
Copy link

Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning nil on error may lead to nil-slice operations downstream. Consider returning an empty slice or logging the error before returning.

Suggested change
return nil
logf.Log.Error(err, "Failed to execute command", "command", "kubectl get secrets -n "+ns)
return []string{}

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@patrykw-splunk patrykw-splunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Igor-splunk Igor-splunk merged commit 6c4484d into develop Jun 30, 2025
27 checks passed
@Igor-splunk Igor-splunk deleted the CSPL-3675-operator-sdk branch June 30, 2025 12:35
rlieberman-splunk added a commit that referenced this pull request Sep 15, 2025
* CSPL-3704 SmartStore ownerReferences removed

* CSPL-3704 Integration tests enabled to check the PR

* CSPL-3704 Fix failing tests

* CSPL-3704 Remove branch from int tests

* test

* CSPL-3705 Ignoring an error if decommisioning already enabled

* CSPL-3705 Removing branch from integ tests

* CSPL-3705 Addressing a comment

* clean-up deprecated dirs - .circleci & .devcontainer (#1499)

Co-authored-by: Patryk Wasielewski <[email protected]>

* set imagePullPolicy default in helm chart (#1513)

* CSPL-3186: Upgrade Enterprise Security Version 8.0.2 (#1425)

* Updates for integration tests and documentation with latest ES version

* Update enterprise security versions and app files

* remove branch from inte test workflow

* CSPL-3688: Update Prerelease Workflow (#1502)

* add more automation to pre-release workflow

* update version and replaced version in bundle files

* update dockerfile sok version, not enterprise version

* fix typo

* CSPL-3584: Split run-tests.sh into multiple files (#1507)

* split run-tests.sh into multiple files

* trigger integration tests on branch

* use scriptdir to run sh files

* remove trigger int test workflow

* test azure, gcp, and namespace scoped workflows

* cleanup workflows

* feature: add support for pre-created PVs - admin-managed-pv annotation (#1509)

* add support for admin-managed-pv annotation

---------

Co-authored-by: Patryk Wasielewski <[email protected]>

* Removing App Framework tests for C3 and M4 on ARM builds

* CSPL-3702 Replacing () with {} in script variables

* Ginkgo upgrade

* CSPL-3768 Adding inputs to Graviton pipelines and tests

* CSPL-3768 Not disclosing ECR secret value

* CSPL-3678 Introducing pipeline for Graviton and some fixes

* CSPL-3768 Fixes

* CSPL-3768 Fixes

* CSPL-3768 Addressing Copilot suggestions

* CSPL-3768 Addressing comments

* CSPL-3759 Addressing soon to be deprecated

* CSPL-3784: Update base image to latest ubi8-minimal version (#1525)

* update base image to latest ubi8-minimal version

* trigger integration test cases for branch

* trigger tests

* cleanup

* update Dockerfile comment

* CSPL-3675 Update Operator-SDK to v1.39 (#1488)


* v.1.39.0 migration

---------

Co-authored-by: igor.grzankowski <@splunk.com>
Co-authored-by: Vivek Reddy <[email protected]>
Co-authored-by: rlieberman-splunk <[email protected]>
Co-authored-by: kasiakoziol <[email protected]>
Co-authored-by: Patryk Wasielewski <[email protected]>

* CSPL_3759 Ginkgo types to v2

* Add DeepWiki badge (#1529)

Co-authored-by: igor.grzankowski <@splunk.com>

* Upgrade golang.org/x/net version to v0.38.0 (#1530)

* upgrade golang.org/x/net version to v0.38.0

* trigger integration test cases on branch

* remove integration test trigger

* CSPL-3783: Update AppFramework docs with troubleshooting information (#1527)

* Add more logs around invalid phase and downloadPending (#1528)

* Remove kube rbac proxy from helm charts (#1531)

Co-authored-by: igor.grzankowski <@splunk.com>

* CSPL-3851 Adding info to docs about session stickiness for ingress

* Remove in progress phase

* Revert "Remove in progress phase"

This reverts commit 3c919d6.

* update SmartStore documentation for gcp and azure (#1541)

* Backport main to develop for Splunk Operator Release 2.8.1 (#1542) (#1543)

*  release 2.8.1 chnages - backported

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: patrykw-splunk <[email protected]>

* CSPL-3898 Fixing int-helm tests failing after SDK upgrade (#1544)

* CSPL-3867: SHC and CM Error Message Visibility (#1548)

* print error for update status failed

* add deployerPhase initial value

* set correct Kind in ClusterManager events

* cleanup

* use v4 in test

* CSPL-3905: Security and dependency updates (#1551)

* initial changes for aws-sdk-go-v2

* code compiles and unit tests pass

* trigger smoke and integration tests, update context

* set correct path for downloading from s3 bucket for tests

* update ENTERPRISE_LICENSE_LOCATION

* security updates, uncomment test suites

* cleanup

* [CSPL-3912] Allow Custom Probe Scripts (#1549)

* Promote Develop to main for Splunk Operator Release 2.8.1 (#1542)

* release preparation - release 2.8.1

---------

Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: patrykw-splunk <[email protected]>

* check for existing configmap before creating a new one

* update error handling

* fix unit tests

* cleanup and documentation updates

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: patrykw-splunk <[email protected]>

* CSPL-3913: Pass dynamic environment variables in Splunk StatefulSet for Ansible-based config generation (#1555)

* add new environment variables for config generation

* unit test updates

* add api version to env var

* Promote Develop to main for Splunk Operator Release 2.8.1 (#1542) (#1553)

* release 2.8.1

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: patrykw-splunk <[email protected]>

* Document skipping apply cluster-bundle on cluster managers (#1556)

* Update of shc upgrade process (#1547)

Update of shc upgrade process

---------

Co-authored-by: Patryk Wasielewski <[email protected]>

* Update Helm.md (#1563)

Co-authored-by: Patryk Wasielewski <[email protected]>

* Merge Splunk10 feature changes into develop (#1559)

* CSPL-3707: Update documentation around minimum number of indexer cluster peers (#1558)

* document minimum number of CR replicas

* update examples documentation

* Default Build to multi-platform amd64 and arm64 (#1557)

* add linux/arm64 as a platform to build the operator by default

* set platforms in dockerfile

* use tag instead of sha

* update tag version

* update base image to latest

* Remove kube-rbac-proxy references and implement upgrade-sdk 1.38 changes (#1565)

* remove kube-rbac-proxy references and implement upgrade-sdk 1.38 changes

* fix kustomize references

* fix container number for debug

* cleanup

* fix service for metrics

---------

Co-authored-by: Patryk Wasielewski <[email protected]>

* helm changes for 3.0.0 release (#1566)

Co-authored-by: Patryk Wasielewski <[email protected]>

* Fix kustomization templates after removing kube-rbac-proxy (#1570)

* fix kustomization templates

---------

Co-authored-by: Patryk Wasielewski <[email protected]>

* Splunk Operator 3.0.0 release (#1572)

* Update changelog

---------

Co-authored-by: Igor-splunk <[email protected]>
Co-authored-by: igor.grzankowski <@splunk.com>

* remove old helm charts from splunk-enterprise/charts folder

---------

Co-authored-by: kasiakoziol <[email protected]>
Co-authored-by: patrykw-splunk <[email protected]>
Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: rlieberman-splunk <[email protected]>
Co-authored-by: Igor Grzankowski <[email protected]>
Co-authored-by: Vivek Reddy <[email protected]>
Co-authored-by: igor.grzankowski <@splunk.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: patrykw-splunk <[email protected]>
Co-authored-by: Igor-splunk <[email protected]>
rlieberman-splunk added a commit that referenced this pull request Sep 26, 2025
* Promote Develop to main for Splunk Operator Release 3.0.0 (#1573)

* CSPL-3704 SmartStore ownerReferences removed

* CSPL-3704 Integration tests enabled to check the PR

* CSPL-3704 Fix failing tests

* CSPL-3704 Remove branch from int tests

* test

* CSPL-3705 Ignoring an error if decommisioning already enabled

* CSPL-3705 Removing branch from integ tests

* CSPL-3705 Addressing a comment

* clean-up deprecated dirs - .circleci & .devcontainer (#1499)

Co-authored-by: Patryk Wasielewski <[email protected]>

* set imagePullPolicy default in helm chart (#1513)

* CSPL-3186: Upgrade Enterprise Security Version 8.0.2 (#1425)

* Updates for integration tests and documentation with latest ES version

* Update enterprise security versions and app files

* remove branch from inte test workflow

* CSPL-3688: Update Prerelease Workflow (#1502)

* add more automation to pre-release workflow

* update version and replaced version in bundle files

* update dockerfile sok version, not enterprise version

* fix typo

* CSPL-3584: Split run-tests.sh into multiple files (#1507)

* split run-tests.sh into multiple files

* trigger integration tests on branch

* use scriptdir to run sh files

* remove trigger int test workflow

* test azure, gcp, and namespace scoped workflows

* cleanup workflows

* feature: add support for pre-created PVs - admin-managed-pv annotation (#1509)

* add support for admin-managed-pv annotation

---------

Co-authored-by: Patryk Wasielewski <[email protected]>

* Removing App Framework tests for C3 and M4 on ARM builds

* CSPL-3702 Replacing () with {} in script variables

* Ginkgo upgrade

* CSPL-3768 Adding inputs to Graviton pipelines and tests

* CSPL-3768 Not disclosing ECR secret value

* CSPL-3678 Introducing pipeline for Graviton and some fixes

* CSPL-3768 Fixes

* CSPL-3768 Fixes

* CSPL-3768 Addressing Copilot suggestions

* CSPL-3768 Addressing comments

* CSPL-3759 Addressing soon to be deprecated

* CSPL-3784: Update base image to latest ubi8-minimal version (#1525)

* update base image to latest ubi8-minimal version

* trigger integration test cases for branch

* trigger tests

* cleanup

* update Dockerfile comment

* CSPL-3675 Update Operator-SDK to v1.39 (#1488)


* v.1.39.0 migration

---------

Co-authored-by: igor.grzankowski <@splunk.com>
Co-authored-by: Vivek Reddy <[email protected]>
Co-authored-by: rlieberman-splunk <[email protected]>
Co-authored-by: kasiakoziol <[email protected]>
Co-authored-by: Patryk Wasielewski <[email protected]>

* CSPL_3759 Ginkgo types to v2

* Add DeepWiki badge (#1529)

Co-authored-by: igor.grzankowski <@splunk.com>

* Upgrade golang.org/x/net version to v0.38.0 (#1530)

* upgrade golang.org/x/net version to v0.38.0

* trigger integration test cases on branch

* remove integration test trigger

* CSPL-3783: Update AppFramework docs with troubleshooting information (#1527)

* Add more logs around invalid phase and downloadPending (#1528)

* Remove kube rbac proxy from helm charts (#1531)

Co-authored-by: igor.grzankowski <@splunk.com>

* CSPL-3851 Adding info to docs about session stickiness for ingress

* Remove in progress phase

* Revert "Remove in progress phase"

This reverts commit 3c919d6.

* update SmartStore documentation for gcp and azure (#1541)

* Backport main to develop for Splunk Operator Release 2.8.1 (#1542) (#1543)

*  release 2.8.1 chnages - backported

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: patrykw-splunk <[email protected]>

* CSPL-3898 Fixing int-helm tests failing after SDK upgrade (#1544)

* CSPL-3867: SHC and CM Error Message Visibility (#1548)

* print error for update status failed

* add deployerPhase initial value

* set correct Kind in ClusterManager events

* cleanup

* use v4 in test

* CSPL-3905: Security and dependency updates (#1551)

* initial changes for aws-sdk-go-v2

* code compiles and unit tests pass

* trigger smoke and integration tests, update context

* set correct path for downloading from s3 bucket for tests

* update ENTERPRISE_LICENSE_LOCATION

* security updates, uncomment test suites

* cleanup

* [CSPL-3912] Allow Custom Probe Scripts (#1549)

* Promote Develop to main for Splunk Operator Release 2.8.1 (#1542)

* release preparation - release 2.8.1

---------

Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: patrykw-splunk <[email protected]>

* check for existing configmap before creating a new one

* update error handling

* fix unit tests

* cleanup and documentation updates

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: patrykw-splunk <[email protected]>

* CSPL-3913: Pass dynamic environment variables in Splunk StatefulSet for Ansible-based config generation (#1555)

* add new environment variables for config generation

* unit test updates

* add api version to env var

* Promote Develop to main for Splunk Operator Release 2.8.1 (#1542) (#1553)

* release 2.8.1

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: patrykw-splunk <[email protected]>

* Document skipping apply cluster-bundle on cluster managers (#1556)

* Update of shc upgrade process (#1547)

Update of shc upgrade process

---------

Co-authored-by: Patryk Wasielewski <[email protected]>

* Update Helm.md (#1563)

Co-authored-by: Patryk Wasielewski <[email protected]>

* Merge Splunk10 feature changes into develop (#1559)

* CSPL-3707: Update documentation around minimum number of indexer cluster peers (#1558)

* document minimum number of CR replicas

* update examples documentation

* Default Build to multi-platform amd64 and arm64 (#1557)

* add linux/arm64 as a platform to build the operator by default

* set platforms in dockerfile

* use tag instead of sha

* update tag version

* update base image to latest

* Remove kube-rbac-proxy references and implement upgrade-sdk 1.38 changes (#1565)

* remove kube-rbac-proxy references and implement upgrade-sdk 1.38 changes

* fix kustomize references

* fix container number for debug

* cleanup

* fix service for metrics

---------

Co-authored-by: Patryk Wasielewski <[email protected]>

* helm changes for 3.0.0 release (#1566)

Co-authored-by: Patryk Wasielewski <[email protected]>

* Fix kustomization templates after removing kube-rbac-proxy (#1570)

* fix kustomization templates

---------

Co-authored-by: Patryk Wasielewski <[email protected]>

* Splunk Operator 3.0.0 release (#1572)

* Update changelog

---------

Co-authored-by: Igor-splunk <[email protected]>
Co-authored-by: igor.grzankowski <@splunk.com>

* remove old helm charts from splunk-enterprise/charts folder

---------

Co-authored-by: kasiakoziol <[email protected]>
Co-authored-by: patrykw-splunk <[email protected]>
Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: rlieberman-splunk <[email protected]>
Co-authored-by: Igor Grzankowski <[email protected]>
Co-authored-by: Vivek Reddy <[email protected]>
Co-authored-by: igor.grzankowski <@splunk.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: patrykw-splunk <[email protected]>
Co-authored-by: Igor-splunk <[email protected]>

* CSPL-4005: Remove CRDs from splunk/splunk-operator helm chart (#1579)

* remove crds from helm chart, needs documentation

* add documentation about adding CRDs before helm chart installation

* repackage helm charts

* cleanup helm test workflow

* Helm package: helm package changes 3.0.0 (#1582)

* helm test case

* .env changes with spulnk 10.0.0

* updated splunk default version to 10

* removed helm test from branch

---------

Co-authored-by: Vivek Reddy <[email protected]>

* Vendor only Splunk Operator 3.0.0 in Splunk Enterprise chart to prevent fallback to older operator (#1583)

* removing old splunk operator helm chart

* generate helm packages

---------

Co-authored-by: Vivek Reddy <[email protected]>

* resolve merge conflict

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: kasiakoziol <[email protected]>
Co-authored-by: patrykw-splunk <[email protected]>
Co-authored-by: Patryk Wasielewski <[email protected]>
Co-authored-by: Igor Grzankowski <[email protected]>
Co-authored-by: Vivek Reddy <[email protected]>
Co-authored-by: patrykw-splunk <[email protected]>
Co-authored-by: Igor-splunk <[email protected]>
Co-authored-by: vivekr-splunk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants