[Draft]: CSPL-3432:Add cert-manager Integration to Splunk Operator for Automatic TLS Certificate Management#1460
Closed
vivekr-splunk wants to merge 1 commit into
Closed
[Draft]: CSPL-3432:Add cert-manager Integration to Splunk Operator for Automatic TLS Certificate Management#1460vivekr-splunk wants to merge 1 commit into
vivekr-splunk wants to merge 1 commit into
Conversation
Signed-off-by: Vivek Reddy <vivekrsplunk@github.com>
Collaborator
Pull Request Test Coverage Report for Build 13671079310Details
💛 - Coveralls |
Collaborator
Pull Request Test Coverage Report for Build 13671079317Details
💛 - Coveralls |
rmouritzen-splunk
suggested changes
Sep 4, 2025
| <summary><strong>Install via Helm (Recommended)</strong></summary> | ||
|
|
||
| ```bash | ||
| helm repo add jetstack https://charts.jetstack.io |
There was a problem hiding this comment.
This is installing cert-manager from the legacy location. From what I'm seeing online, the Jetstack version was decommissioned back in May 2025. Looks like this should use the newer location for the current open source fork of the project. See https://cert-manager.io/docs/installation/helm/
(I'm working on the Splunk Security Operator, which is why I came across this.)
Edit: This PR is from March 2025, so this looks like a minor case of bit-rot. Apparently CyberArk, the current maintainer, (indirectly) acquired JetStack, the original creator. Should be easy to fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request introduces cert-manager integration into the Splunk Operator, enabling automated TLS certificate provisioning and renewal for Splunk Pods. The changes allow users to specify whether they want to use:
csi.cert-manager.iodriver.By setting certain annotations on the Splunk Custom Resource (CR), operators can choose the appropriate method for their environment. The Splunk Operator then modifies the final Pod spec accordingly—injecting the cert-manager CSI volume or sidecar references.
Key Changes
Annotation-Based Approach
splunk.com/cert-managerthat can be set to either:"csi"– Use the cert-manager CSI driver to mount certificates."injector"(or"sidecar") – Use a sidecar container approach (or an external sidecar injector webhook).New Helper Functions
addCertManagerCsiVolume(...):csi.cert-manager.iodriver.readOnly: trueis set (required by cert-manager CSI).splunk.com/cert-secret-name,splunk.com/cert-issuer-name, etc. to populatevolumeAttributes(e.g.csi.cert-manager.io/secret-name,csi.cert-manager.io/issuer-name, etc.).VolumeMountfor/mnt/splunk/certificates(or any configured path) within the Splunk container.addCertManagerSidecarInjector(...)(oraddCertManagerSidecar(...)if manual injection):inotifywait) and triggers Splunk to reload on changes.Pod Template Updates
updateSplunkPodTemplateWithConfig(...), the Operator checks ifsplunk.com/cert-manageris set.Support for Key Reuse
reuse-private-key: "true"is detected, the Operator expectssecret-nameto be specified so the private key can be stored in a persistent Secret.Better Error Handling and Debug
issuerName,secretName) appear in the final Pod spec.How to Use
selfsigned-issuerorletsencrypt-prod.Testing
issuerName,secretName, andreadOnly: trueare correctly included in the generated Pod spec.splunk.com/cert-manager: "csi"successfully mounts a certificate fromcsi.cert-manager.ioand that reloading logic handles certificate updates.Additional Notes
/mnt/splunk/certificates(or their chosen mount path).