Skip to content

Conversation

@jmsplunk
Copy link
Collaborator

@jmsplunk jmsplunk commented Jan 21, 2026

Description

Add a new env KVSERVICE_CONNECTION_STRING so that during the splunk instance initialization, the splunk-ansible can pick it up and update the server.conf
ansible PR

Key Changes

Add the KVSERVICE_CONNECTION_STRING in every pod env
Add the get connection string function which will return the service dns and port.

Testing and Verification

Deploy the new operator

root@ip-10-236-5-61:~/splunk-operator# kubectl describe pod splunk-test-kvstore-standalone-0 -n splunk-operator | grep kvservice
      KVSERVICE_CONNECTION_STRING:                   splunk-kvservice.splunk-operator.svc.cluster.local:443

Build the splunk image using the private splunk-ansible build

root@ip-10-236-5-61:~/splunk-operator# kubectl exec -n splunk-operator splunk-test-kvstore-standalone-0 -- cat /opt/splunk/etc/system/local/server.conf | grep -A2 "\[kvstore\]"
[kvstore]
externalManagedKVStoreConnectionString = splunk-kvservice.splunk-operator.svc.cluster.local:443

Related Issues

Jira tickets, GitHub issues, Support tickets...

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.

// getKVServiceConnectionString returns the connection string for KVService
func getKVServiceConnectionString(ctx context.Context, client splcommon.ControllerClient, namespace string) string {
// TODO:
// wait until the KVService is ready
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, for now, we can return nil?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think its fine to have some dummy value returned since we are not merging it to main branch and its easier for our testings

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

CLA Assistant Lite bot CLA Assistant Lite bot All contributors have signed the COC ✍️ ✅

@github-actions
Copy link
Contributor

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@jmsplunk jmsplunk self-assigned this Jan 22, 2026
@jmsplunk
Copy link
Collaborator Author

I have read the CLA Document and I hereby sign the CLA

@jmsplunk
Copy link
Collaborator Author

I have read the Code of Conduct and I hereby accept the Terms

@jmsplunk jmsplunk marked this pull request as ready for review January 26, 2026 18:53
@rlieberman-splunk
Copy link
Collaborator

Is there a corresponding splunk-ansible PR? Or does this functionality already exist there?

@jmsplunk
Copy link
Collaborator Author

jmsplunk commented Jan 26, 2026

@rlieberman-splunk this is the PR. I linked in the testing part i will move it above to make it more visiable

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