Skip to content

Conversation

@patrykw-splunk
Copy link
Collaborator

@patrykw-splunk patrykw-splunk commented Jan 16, 2026

Description

This PR aims to add validation webhook for splunk-operator. This includes every CRD that operator consist of.

Key Changes

[DRAFT]

  • Dummy validation webhook implementation
  • Kustomize config
  • cert-manager config

Testing and Verification

N/A

Related Issues

N/A

PR Checklist

  • Code changes adhere to the project's coding standards.
  • Relevant unit and integration tests are included.
  • Documentation has been updated accordingly.
  • All tests pass locally.
  • The PR description follows the project's guidelines.

@coveralls
Copy link
Collaborator

coveralls commented Jan 16, 2026

Pull Request Test Coverage Report for Build 21135429752

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.008%) to 86.363%

Files with Coverage Reduction New Missed Lines %
pkg/splunk/enterprise/cp.go 1 33.33%
Totals Coverage Status
Change from base Build 21029015253: -0.008%
Covered Lines: 10728
Relevant Lines: 12422

💛 - Coveralls

@@ -0,0 +1,60 @@
/*
Copyright (c) 2018-2022 Splunk Inc. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it requires updating to 2026 included

type SplunkValidator struct{}

// SetupWebhookWithManager registers the centralized webhook with the manager
func SetupWebhookWithManager(mgr ctrl.Manager) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't need an error return at all if we always return nil

cmd/main.go Outdated
}

// Setup centralized validation webhook for all CRDs
if err = enterpriseApi.SetupWebhookWithManager(mgr); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

And if we always return nil in SetupWebhookWithManager, then this if is not required

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.

3 participants