Splunk Operator custom resource reference
Parameters shared across all Splunk Operator custom resources.
The Splunk Operator provides a collection of custom resources you can use to manage Splunk Enterprise deployments in your Kubernetes cluster.
Metadata parameters
All resources in Kubernetes include a metadata section. You can use this to define a name for a specific instance of the resource and the namespace where the resource resides:
| Key | Type | Description |
|---|---|---|
| name | string | This name distinguishes each instance of your resource. |
| namespace | string | The operator creates your instance within this namespace. You must ensure that this namespace exists beforehand. |
If you do not provide a namespace, the operator uses your current context.
apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
name: s1
namespace: splunk
finalizers:
- enterprise.splunk.com/delete-pvc
The enterprise.splunk.com/delete-pvc finalizer is optional. Use it to tell the Splunk Operator to remove all Persistent Volumes associated with the instance when you delete it.
Common spec parameters for all resources
apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal: "true"
name: example
spec:
imagePullPolicy: Always
livenessInitialDelaySeconds: 400
readinessInitialDelaySeconds: 390
serviceTemplate:
spec:
type: LoadBalancer
topologySpreadConstraints:
- maxSkew: 1
topologyKey: zone
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
foo: bar
extraEnv:
- name: ADDITIONAL_ENV_VAR_1
value: "test_value_1"
- name: ADDITIONAL_ENV_VAR_2
value: "test_value_2"
resources:
requests:
memory: "512Mi"
cpu: "0.1"
limits:
memory: "8Gi"
cpu: "4"
The spec section defines the desired state for a resource. The Splunk Operator custom resources include the following configuration parameters:
| Key | Type | Description |
|---|---|---|
| image | string | Container image to use for pod instances (overrides RELATED_IMAGE_SPLUNK_ENTERPRISE environment variable) |
| imagePullPolicy | string | Sets pull policy for all images (either Always or the default: IfNotPresent) |
| livenessInitialDelaySeconds | number | Sets the initialDelaySeconds for Liveness probe (default: 300) |
| readinessInitialDelaySeconds | number | Sets the initialDelaySeconds for Readiness probe (default: 10) |
| extraEnv | EnvVar | Sets extra environment variables to pass to the Splunk instance containers. Setting environment variables used by Splunk or Ansible affects Splunk installation and operation. |
| schedulerName | string | Name of Scheduler to use for pod placement (defaults to default-scheduler) |
| affinity | Affinity | Kubernetes Affinity rules that control how the scheduler assigns pods to particular nodes |
| resources | ResourceRequirements | The settings for allocating compute resource requirements for each pod instance. Use the default settings for demo and test purposes only. See Hardware Resource Requirements for production values. |
| serviceTemplate | Service | Template used to create Kubernetes Services |
| topologySpreadConstraint | TopologySpreadConstraint | Template used to create Kubernetes topology spread constraints |
Common spec parameters for Splunk Enterprise resources
apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
name: example
spec:
etcVolumeStorageConfig:
storageClassName: gp2
storageCapacity: 15Gi
varVolumeStorageConfig:
storageClassName: customStorageClass
storageCapacity: 25Gi
volumes:
- name: licenses
configMap:
name: splunk-licenses
licenseManagerRef:
name: example
clusterManagerRef:
name: example
serviceAccount: custom-serviceaccount
The following additional configuration parameters apply to all Splunk Enterprise resources, including: Standalone, LicenseManager, SearchHeadCluster, ClusterManager, IndexerCluster, and IngestorCluster:
| Key | Type | Description |
|---|---|---|
| etcVolumeStorageConfig | StorageClassSpec | Storage class spec for the Splunk etc volume as described in the StorageClass reference |
| varVolumeStorageConfig | StorageClassSpec | Storage class spec for the Splunk var volume as described in the StorageClass reference |
| volumes | Volume | List of one or more Kubernetes volumes. The operator mounts these in all container pods as /mnt/<name> |
| defaults | string | Inline map of default.yml overrides used to initialize the environment |
| defaultsUrl | string | Full path or URL for one or more default.yml files, separated by commas |
| licenseUrl | string | Full path or URL for a Splunk Enterprise license file |
| licenseManagerRef | ObjectReference | Reference to a Splunk Operator managed LicenseManager instance (via name and optionally namespace) to use for licensing |
| clusterManagerRef | ObjectReference | Reference to a Splunk Operator managed ClusterManager instance (via name and optionally namespace) to use for indexing |
| monitoringConsoleRef | string | Logical name assigned to the Monitoring Console pod. You can set the name before or after the MC pod creation. |
| serviceAccount | ServiceAccount | Represents the service account used by the pods deployed by the CRD |
| extraEnv | Extra environment variables | Extra environment variables to pass to the Splunk instance containers |
| readinessInitialDelaySeconds | readinessProbe initialDelaySeconds | Defines initialDelaySeconds for the Readiness probe |
| livenessInitialDelaySeconds | livenessProbe initialDelaySeconds | Defines initialDelaySeconds for the Liveness probe |
| imagePullSecrets | imagePullSecrets | Config to pull images from a private registry. Use in conjunction with the image config from the common spec parameters for all resources. |