Skip to content

Commit c204d52

Browse files
committed
CSPL-3558 Adding helm test
1 parent c354062 commit c204d52

File tree

9 files changed

+352
-16
lines changed

9 files changed

+352
-16
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
# assert for splunk operator deployment to be ready
3+
apiVersion: apps/v1
4+
kind: Deployment
5+
metadata:
6+
name: splunk-operator-controller-manager
7+
status:
8+
readyReplicas: 1
9+
availableReplicas: 1
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
commands:
5+
- script: ../script/installoperator.sh
6+
background: false
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
# assert for cluster manager custom resource to be ready
3+
apiVersion: enterprise.splunk.com/v4
4+
kind: ClusterManager
5+
metadata:
6+
name: cm
7+
status:
8+
phase: Ready
9+
10+
---
11+
# check if stateful sets are created
12+
apiVersion: apps/v1
13+
kind: StatefulSet
14+
metadata:
15+
name: splunk-cm-cluster-manager
16+
status:
17+
replicas: 1
18+
19+
---
20+
# check if secret object are created
21+
apiVersion: v1
22+
kind: Secret
23+
metadata:
24+
name: splunk-cm-cluster-manager-secret-v1
25+
26+
---
27+
# assert for indexer cluster custom resource to be ready
28+
apiVersion: enterprise.splunk.com/v4
29+
kind: IndexerCluster
30+
metadata:
31+
name: idxc
32+
pipelineConfig:
33+
remoteQueueRuleset: false
34+
ruleSet: true
35+
remoteQueueTyping: false
36+
remoteQueueOutput: false
37+
typing: true
38+
indexerPipe: true
39+
pullBus:
40+
type: sqs_smartbus
41+
sqs:
42+
queueName: kkoziol-sqs-test
43+
authRegion: us-west-2
44+
endpoint: https://sqs.us-west-2.amazonaws.com
45+
largeMessageStoreEndpoint: https://s3.us-west-2.amazonaws.com
46+
largeMessageStorePath: s3://kkoziol-ingestion/smartbus-test-kkoziol
47+
deadLetterQueueName: kkoziol-sqs-dlq-test
48+
maxRetriesPerPart: 4
49+
retryPolicy: max_count
50+
sendInterval: 5s
51+
encodingFormat: s2s
52+
status:
53+
phase: Ready
54+
pipelineConfig:
55+
remoteQueueRuleset: false
56+
ruleSet: true
57+
remoteQueueTyping: false
58+
remoteQueueOutput: false
59+
typing: true
60+
indexerPipe: true
61+
pullBus:
62+
type: sqs_smartbus
63+
sqs:
64+
queueName: kkoziol-sqs-test
65+
authRegion: us-west-2
66+
endpoint: https://sqs.us-west-2.amazonaws.com
67+
largeMessageStoreEndpoint: https://s3.us-west-2.amazonaws.com
68+
largeMessageStorePath: s3://kkoziol-ingestion/smartbus-test-kkoziol
69+
deadLetterQueueName: kkoziol-sqs-dlq-test
70+
maxRetriesPerPart: 4
71+
retryPolicy: max_count
72+
sendInterval: 5s
73+
encodingFormat: s2s
74+
75+
---
76+
# check for stateful set and replicas as configured
77+
apiVersion: apps/v1
78+
kind: StatefulSet
79+
metadata:
80+
name: splunk-idxc-indexer
81+
status:
82+
replicas: 3
83+
84+
---
85+
# check if secret object are created
86+
apiVersion: v1
87+
kind: Secret
88+
metadata:
89+
name: splunk-idxc-indexer-secret-v1
90+
91+
---
92+
# assert for indexer cluster custom resource to be ready
93+
apiVersion: enterprise.splunk.com/v4
94+
kind: IngestorCluster
95+
metadata:
96+
name: ingestor
97+
spec:
98+
replicas: 3
99+
pipelineConfig:
100+
remoteQueueRuleset: false
101+
ruleSet: true
102+
remoteQueueTyping: false
103+
remoteQueueOutput: false
104+
typing: true
105+
indexerPipe: true
106+
pushBus:
107+
type: sqs_smartbus
108+
sqs:
109+
queueName: kkoziol-sqs-test
110+
authRegion: us-west-2
111+
endpoint: https://sqs.us-west-2.amazonaws.com
112+
largeMessageStoreEndpoint: https://s3.us-west-2.amazonaws.com
113+
largeMessageStorePath: s3://kkoziol-ingestion/smartbus-test-kkoziol
114+
deadLetterQueueName: kkoziol-sqs-dlq-test
115+
maxRetriesPerPart: 4
116+
retryPolicy: max_count
117+
sendInterval: 5s
118+
encodingFormat: s2s
119+
status:
120+
phase: Ready
121+
pipelineConfig:
122+
remoteQueueRuleset: false
123+
ruleSet: true
124+
remoteQueueTyping: false
125+
remoteQueueOutput: false
126+
typing: true
127+
indexerPipe: true
128+
pushBus:
129+
type: sqs_smartbus
130+
sqs:
131+
queueName: kkoziol-sqs-test
132+
authRegion: us-west-2
133+
endpoint: https://sqs.us-west-2.amazonaws.com
134+
largeMessageStoreEndpoint: https://s3.us-west-2.amazonaws.com
135+
largeMessageStorePath: s3://kkoziol-ingestion/smartbus-test-kkoziol
136+
deadLetterQueueName: kkoziol-sqs-dlq-test
137+
maxRetriesPerPart: 4
138+
retryPolicy: max_count
139+
sendInterval: 5s
140+
encodingFormat: s2s
141+
142+
---
143+
# check for stateful set and replicas as configured
144+
apiVersion: apps/v1
145+
kind: StatefulSet
146+
metadata:
147+
name: splunk-ingestor-ingestor
148+
status:
149+
replicas: 3
150+
151+
---
152+
# check if secret object are created
153+
apiVersion: v1
154+
kind: Secret
155+
metadata:
156+
name: splunk-ingestor-ingestor-secret-v1
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
commands:
5+
- command: helm install splunk-index-ingest-sep $HELM_REPO_PATH/splunk-enterprise -f splunk_index_ingest_sep.yaml
6+
namespaced: true
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
# assert for ingestor cluster custom resource to be ready
3+
apiVersion: enterprise.splunk.com/v4
4+
kind: IngestorCluster
5+
metadata:
6+
name: ingestor
7+
spec:
8+
replicas: 4
9+
pipelineConfig:
10+
remoteQueueRuleset: false
11+
ruleSet: true
12+
remoteQueueTyping: false
13+
remoteQueueOutput: false
14+
typing: true
15+
indexerPipe: true
16+
pushBus:
17+
type: sqs_smartbus
18+
sqs:
19+
queueName: kkoziol-sqs-test
20+
authRegion: us-west-2
21+
endpoint: https://sqs.us-west-2.amazonaws.com
22+
largeMessageStoreEndpoint: https://s3.us-west-2.amazonaws.com
23+
largeMessageStorePath: s3://kkoziol-ingestion/smartbus-test-kkoziol
24+
deadLetterQueueName: kkoziol-sqs-dlq-test
25+
maxRetriesPerPart: 4
26+
retryPolicy: max_count
27+
sendInterval: 5s
28+
encodingFormat: s2s
29+
status:
30+
phase: Ready
31+
pipelineConfig:
32+
remoteQueueRuleset: false
33+
ruleSet: true
34+
remoteQueueTyping: false
35+
remoteQueueOutput: false
36+
typing: true
37+
indexerPipe: true
38+
pushBus:
39+
type: sqs_smartbus
40+
sqs:
41+
queueName: kkoziol-sqs-test
42+
authRegion: us-west-2
43+
endpoint: https://sqs.us-west-2.amazonaws.com
44+
largeMessageStoreEndpoint: https://s3.us-west-2.amazonaws.com
45+
largeMessageStorePath: s3://kkoziol-ingestion/smartbus-test-kkoziol
46+
deadLetterQueueName: kkoziol-sqs-dlq-test
47+
maxRetriesPerPart: 4
48+
retryPolicy: max_count
49+
sendInterval: 5s
50+
encodingFormat: s2s
51+
52+
---
53+
# check for stateful sets and replicas updated
54+
apiVersion: apps/v1
55+
kind: StatefulSet
56+
metadata:
57+
name: splunk-ingestor-ingestor
58+
status:
59+
replicas: 4
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- command: helm upgrade splunk-index-ingest-sep $HELM_REPO_PATH/splunk-enterprise --reuse-values --set ingestorCluster.replicaCount=4
5+
namespaced: true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- command: helm uninstall splunk-index-ingest-sep
5+
namespaced: true
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
splunk-operator:
2+
enabled: false
3+
splunkOperator:
4+
clusterWideAccess: false
5+
persistentVolumeClaim:
6+
storageClassName: gp2
7+
8+
ingestorCluster:
9+
enabled: true
10+
name: ingestor
11+
replicaCount: 3
12+
# serviceAccount: ingestion-role-sa
13+
pipelineConfig:
14+
remoteQueueRuleset: false
15+
ruleSet: true
16+
remoteQueueTyping: false
17+
remoteQueueOutput: false
18+
typing: true
19+
indexerPipe: true
20+
pushBus:
21+
type: sqs_smartbus
22+
sqs:
23+
queueName: kkoziol-sqs-test
24+
authRegion: us-west-2
25+
endpoint: https://sqs.us-west-2.amazonaws.com
26+
largeMessageStoreEndpoint: https://s3.us-west-2.amazonaws.com
27+
largeMessageStorePath: s3://kkoziol-ingestion/smartbus-test-kkoziol
28+
deadLetterQueueName: kkoziol-sqs-dlq-test
29+
maxRetriesPerPart: 4
30+
retryPolicy: max_count
31+
sendInterval: 5s
32+
encodingFormat: s2s
33+
34+
clusterManager:
35+
enabled: true
36+
name: cm
37+
replicaCount: 1
38+
# serviceAccount: ingestion-role-sa
39+
40+
indexerCluster:
41+
enabled: true
42+
name: indexer
43+
replicaCount: 3
44+
# serviceAccount: ingestion-role-sa
45+
clusterManagerRef:
46+
name: cm
47+
pipelineConfig:
48+
remoteQueueRuleset: false
49+
ruleSet: true
50+
remoteQueueTyping: false
51+
remoteQueueOutput: false
52+
typing: true
53+
indexerPipe: true
54+
pullBus:
55+
type: sqs_smartbus
56+
sqs:
57+
queueName: kkoziol-sqs-test
58+
authRegion: us-west-2
59+
endpoint: https://sqs.us-west-2.amazonaws.com
60+
largeMessageStoreEndpoint: https://s3.us-west-2.amazonaws.com
61+
largeMessageStorePath: s3://kkoziol-ingestion/smartbus-test-kkoziol
62+
deadLetterQueueName: kkoziol-sqs-dlq-test
63+
maxRetriesPerPart: 4
64+
retryPolicy: max_count
65+
sendInterval: 5s
66+
encodingFormat: s2s

0 commit comments

Comments
 (0)