Skip to content

Splunk Operator: Add labels to the metadata of the statefulsets created by the operator #1444

@mcaci

Description

@mcaci

Please select the type of request

Enhancement

Tell us more

Describe the request
Today the statefulsets created by the operator include labels in the metadata of the pod they ask to deploy (see https://github.com/splunk/splunk-operator/blob/main/pkg/splunk/enterprise/configuration.go#L671).
The objective of this issue is to add the same set of labels to the metadata of the created statefulset itself (and not just of the dependent pods).

Expected behavior
Labels in the metadata of the statefulset created by the operator are the same as the ones in the metadata of the pods deployed by that statefulset.

Different Splunk setup on K8S and K8s environment should not have impacts on this feature

Reproduction/Testing steps
N/A

Proposed changes(optional)
I prepared a PR for it, I will post it soon

K8s collector data(optional)
N/A

Additional context(optional)
This proposal starts from the fact that we use metadata labels on all k8s resources we deploy to attribute properties and ownership to all of them. With this change we would be able to do the same on the statefulsets created by the operator and not just the pods.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions