Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/splunk/enterprise/ingestorcluster_test.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
{
"kind": "StatefulSet",
"apiVersion": "apps/v1",
"metadata": {
"name": "splunk-test-ingestor",
"namespace": "test",
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/component": "ingestor",
"app.kubernetes.io/instance": "splunk-test-ingestor",
"app.kubernetes.io/managed-by": "splunk-operator",
"app.kubernetes.io/name": "ingestor",
"app.kubernetes.io/part-of": "splunk-test-ingestor"
},
"ownerReferences": [
{
"apiVersion": "",
"kind": "IngestorCluster",
"name": "test",
"uid": "",
"controller": true
}
]
},
"spec": {
"replicas": 3,
"selector": {
"matchLabels": {
"app.kubernetes.io/component": "ingestor",
"app.kubernetes.io/instance": "splunk-test-ingestor",
"app.kubernetes.io/managed-by": "splunk-operator",
"app.kubernetes.io/name": "ingestor",
"app.kubernetes.io/part-of": "splunk-test-ingestor"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/component": "ingestor",
"app.kubernetes.io/instance": "splunk-test-ingestor",
"app.kubernetes.io/managed-by": "splunk-operator",
"app.kubernetes.io/name": "ingestor",
"app.kubernetes.io/part-of": "splunk-test-ingestor"
},
"annotations": {
"traffic.sidecar.istio.io/excludeOutboundPorts": "8089,8191,9997",
"traffic.sidecar.istio.io/includeInboundPorts": "8000,8088"
}
},
"spec": {
"volumes": [
{
"name": "splunk-test-probe-configmap",
"configMap": {
"name": "splunk-test-probe-configmap",
"defaultMode": 365
}
},
{
"name": "mnt-splunk-secrets",
"secret": {
"secretName": "splunk-test-ingestor-secret-v1",
"defaultMode": 420
}
}
],
"containers": [
{
"name": "splunk",
"image": "splunk/splunk",
"ports": [
{ "name": "http-splunkweb", "containerPort": 8000, "protocol": "TCP" },
{ "name": "http-hec", "containerPort": 8088, "protocol": "TCP" },
{ "name": "https-splunkd", "containerPort": 8089, "protocol": "TCP" },
{ "name": "tcp-s2s", "containerPort": 9997, "protocol": "TCP" },
{ "name": "user-defined", "containerPort": 32000, "protocol": "UDP" }
],
"env": [
{ "name": "SPLUNK_HOME", "value": "/opt/splunk" },
{ "name": "SPLUNK_START_ARGS", "value": "--accept-license" },
{ "name": "SPLUNK_DEFAULTS_URL", "value": "/mnt/splunk-secrets/default.yml" },
{ "name": "SPLUNK_HOME_OWNERSHIP_ENFORCEMENT", "value": "false" },
{ "name": "SPLUNK_ROLE", "value": "splunk_ingestor" },
{ "name": "SPLUNK_DECLARATIVE_ADMIN_PASSWORD", "value": "true" },
{ "name": "SPLUNK_OPERATOR_K8_LIVENESS_DRIVER_FILE_PATH", "value": "/tmp/splunk_operator_k8s/probes/k8_liveness_driver.sh" },
{ "name": "SPLUNK_GENERAL_TERMS", "value": "--accept-sgt-current-at-splunk-com" },
{ "name": "SPLUNK_SKIP_CLUSTER_BUNDLE_PUSH", "value": "true" }
],
"resources": {
"limits": { "cpu": "4", "memory": "8Gi" },
"requests": { "cpu": "100m", "memory": "512Mi" }
},
"volumeMounts": [
{ "name": "pvc-etc", "mountPath": "/opt/splunk/etc" },
{ "name": "pvc-var", "mountPath": "/opt/splunk/var" },
{ "name": "splunk-test-probe-configmap", "mountPath": "/mnt/probes" },
{ "name": "mnt-splunk-secrets", "mountPath": "/mnt/splunk-secrets" }
],
"livenessProbe": {
"exec": { "command": ["/mnt/probes/livenessProbe.sh"] },
"initialDelaySeconds": 30,
"timeoutSeconds": 30,
"periodSeconds": 30,
"failureThreshold": 3
},
"readinessProbe": {
"exec": { "command": ["/mnt/probes/readinessProbe.sh"] },
"initialDelaySeconds": 10,
"timeoutSeconds": 5,
"periodSeconds": 5,
"failureThreshold": 3
},
"startupProbe": {
"exec": { "command": ["/mnt/probes/startupProbe.sh"] },
"initialDelaySeconds": 40,
"timeoutSeconds": 30,
"periodSeconds": 30,
"failureThreshold": 12
},
"imagePullPolicy": "IfNotPresent",
"securityContext": {
"capabilities": { "add": ["NET_BIND_SERVICE"], "drop": ["ALL"] },
"privileged": false,
"runAsUser": 41812,
"runAsNonRoot": true,
"allowPrivilegeEscalation": false,
"seccompProfile": { "type": "RuntimeDefault" }
}
}
],
"securityContext": {
"runAsUser": 41812,
"runAsNonRoot": true,
"fsGroup": 41812,
"fsGroupChangePolicy": "OnRootMismatch"
},
"affinity": {
"podAntiAffinity": {
"preferredDuringSchedulingIgnoredDuringExecution": [
{
"weight": 100,
"podAffinityTerm": {
"labelSelector": {
"matchExpressions": [
{
"key": "app.kubernetes.io/instance",
"operator": "In",
"values": ["splunk-test-ingestor"]
}
]
},
"topologyKey": "kubernetes.io/hostname"
}
}
]
}
},
"schedulerName": "default-scheduler"
}
},
"volumeClaimTemplates": [
{
"metadata": {
"name": "pvc-etc",
"namespace": "test",
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/component": "ingestor",
"app.kubernetes.io/instance": "splunk-test-ingestor",
"app.kubernetes.io/managed-by": "splunk-operator",
"app.kubernetes.io/name": "ingestor",
"app.kubernetes.io/part-of": "splunk-test-ingestor"
}
},
"spec": {
"accessModes": ["ReadWriteOnce"],
"resources": { "requests": { "storage": "10Gi" } }
},
"status": {}
},
{
"metadata": {
"name": "pvc-var",
"namespace": "test",
"creationTimestamp": null,
"labels": {
"app.kubernetes.io/component": "ingestor",
"app.kubernetes.io/instance": "splunk-test-ingestor",
"app.kubernetes.io/managed-by": "splunk-operator",
"app.kubernetes.io/name": "ingestor",
"app.kubernetes.io/part-of": "splunk-test-ingestor"
}
},
"spec": {
"accessModes": ["ReadWriteOnce"],
"resources": { "requests": { "storage": "100Gi" } }
},
"status": {}
}
],
"serviceName": "splunk-test-ingestor-headless",
"podManagementPolicy": "Parallel",
"updateStrategy": { "type": "OnDelete" }
},
"status": { "replicas": 0, "availableReplicas": 0 }
}
Loading
Loading