Skip to content

Commit aeb5e81

Browse files
committed
CSPL-3558 Fix tests after merge
1 parent 13b8f4f commit aeb5e81

File tree

12 files changed

+107
-82
lines changed

12 files changed

+107
-82
lines changed

api/v4/ingestorcluster_types.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ type IngestorClusterSpec struct {
5252
// Helper types
5353
// Only SQS as of now
5454
type PushBusSpec struct {
55-
// +kubebuilder:validation:Enum=sqs_smartbus
56-
// +kubebuilder:default=sqs_smartbus
5755
Type string `json:"type"`
5856

5957
SQS SQSSpec `json:"sqs"`
@@ -64,46 +62,32 @@ type SQSSpec struct {
6462

6563
AuthRegion string `json:"authRegion"`
6664

67-
// +kubebuilder:validation:Pattern=`^https://`
6865
Endpoint string `json:"endpoint"`
6966

70-
// +kubebuilder:validation:Pattern=`^https://`
7167
LargeMessageStoreEndpoint string `json:"largeMessageStoreEndpoint"`
7268

73-
// +kubebuilder:validation:Pattern=`^s3://`
7469
LargeMessageStorePath string `json:"largeMessageStorePath"`
7570

7671
DeadLetterQueueName string `json:"deadLetterQueueName"`
7772

78-
// +kubebuilder:validation:Minimum=0
79-
// +kubebuilder:default=3
8073
MaxRetriesPerPart int `json:"maxRetriesPerPart"`
8174

82-
// +kubebuilder:validation:Enum=max_count
83-
// +kubebuilder:default=max_count
8475
RetryPolicy string `json:"retryPolicy"`
8576

86-
// +kubebuilder:validation:Pattern=`^[0-9]+s$`
87-
// +kubebuilder:default="5s"
8877
SendInterval string `json:"sendInterval"`
8978

9079
EncodingFormat string `json:"encodingFormat"`
9180
}
9281

9382
type PipelineConfigSpec struct {
94-
// +kubebuilder:default=false
9583
RemoteQueueRuleset bool `json:"remoteQueueRuleset"`
9684

97-
// +kubebuilder:default=true
9885
RuleSet bool `json:"ruleSet"`
9986

100-
// +kubebuilder:default=false
10187
RemoteQueueTyping bool `json:"remoteQueueTyping"`
10288

103-
// +kubebuilder:default=false
10489
RemoteQueueOutput bool `json:"remoteQueueOutput"`
10590

106-
// +kubebuilder:default=true
10791
Typing bool `json:"typing"`
10892

10993
IndexerPipe bool `json:"indexerPipe"`

config/crd/bases/enterprise.splunk.com_indexerclusters.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5607,22 +5607,16 @@ spec:
56075607
pipelineConfig:
56085608
properties:
56095609
indexerPipe:
5610-
default: true
56115610
type: boolean
56125611
remoteQueueOutput:
5613-
default: false
56145612
type: boolean
56155613
remoteQueueRuleset:
5616-
default: false
56175614
type: boolean
56185615
remoteQueueTyping:
5619-
default: false
56205616
type: boolean
56215617
ruleSet:
5622-
default: true
56235618
type: boolean
56245619
typing:
5625-
default: true
56265620
type: boolean
56275621
type: object
56285622
pullBus:
@@ -5639,34 +5633,21 @@ spec:
56395633
encodingFormat:
56405634
type: string
56415635
endpoint:
5642-
pattern: ^https://
56435636
type: string
56445637
largeMessageStoreEndpoint:
5645-
pattern: ^https://
56465638
type: string
56475639
largeMessageStorePath:
5648-
pattern: ^s3://
56495640
type: string
56505641
maxRetriesPerPart:
5651-
default: 3
5652-
minimum: 0
56535642
type: integer
56545643
queueName:
56555644
type: string
56565645
retryPolicy:
5657-
default: max_count
5658-
enum:
5659-
- max_count
56605646
type: string
56615647
sendInterval:
5662-
default: 5s
5663-
pattern: ^[0-9]+s$
56645648
type: string
56655649
type: object
56665650
type:
5667-
default: sqs_smartbus
5668-
enum:
5669-
- sqs_smartbus
56705651
type: string
56715652
type: object
56725653
readinessInitialDelaySeconds:

config/crd/bases/enterprise.splunk.com_ingestorclusters.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,22 +1584,16 @@ spec:
15841584
description: Pipeline configuration
15851585
properties:
15861586
indexerPipe:
1587-
default: true
15881587
type: boolean
15891588
remoteQueueOutput:
1590-
default: false
15911589
type: boolean
15921590
remoteQueueRuleset:
1593-
default: false
15941591
type: boolean
15951592
remoteQueueTyping:
1596-
default: false
15971593
type: boolean
15981594
ruleSet:
1599-
default: true
16001595
type: boolean
16011596
typing:
1602-
default: true
16031597
type: boolean
16041598
type: object
16051599
pushBus:
@@ -1614,34 +1608,21 @@ spec:
16141608
encodingFormat:
16151609
type: string
16161610
endpoint:
1617-
pattern: ^https://
16181611
type: string
16191612
largeMessageStoreEndpoint:
1620-
pattern: ^https://
16211613
type: string
16221614
largeMessageStorePath:
1623-
pattern: ^s3://
16241615
type: string
16251616
maxRetriesPerPart:
1626-
default: 3
1627-
minimum: 0
16281617
type: integer
16291618
queueName:
16301619
type: string
16311620
retryPolicy:
1632-
default: max_count
1633-
enum:
1634-
- max_count
16351621
type: string
16361622
sendInterval:
1637-
default: 5s
1638-
pattern: ^[0-9]+s$
16391623
type: string
16401624
type: object
16411625
type:
1642-
default: sqs_smartbus
1643-
enum:
1644-
- sqs_smartbus
16451626
type: string
16461627
type: object
16471628
readinessInitialDelaySeconds:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This rule is not used by the project splunk-operator itself.
2+
# It is provided to allow the cluster admin to help manage permissions for users.
3+
#
4+
# Grants permissions to create, update, and delete resources within the enterprise.splunk.com.
5+
# This role is intended for users who need to manage these resources
6+
# but should not control RBAC or manage permissions for others.
7+
8+
apiVersion: rbac.authorization.k8s.io/v1
9+
kind: ClusterRole
10+
metadata:
11+
name: ingestorcluster-editor-role
12+
rules:
13+
- apiGroups:
14+
- enterprise.splunk.com
15+
resources:
16+
- ingestorclusters
17+
verbs:
18+
- create
19+
- delete
20+
- get
21+
- list
22+
- patch
23+
- update
24+
- watch
25+
- apiGroups:
26+
- enterprise.splunk.com
27+
resources:
28+
- ingestorclusters/status
29+
verbs:
30+
- get
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This rule is not used by the project splunk-operator itself.
2+
# It is provided to allow the cluster admin to help manage permissions for users.
3+
#
4+
# Grants read-only access to enterprise.splunk.com resources.
5+
# This role is intended for users who need visibility into these resources
6+
# without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing.
7+
8+
apiVersion: rbac.authorization.k8s.io/v1
9+
kind: ClusterRole
10+
metadata:
11+
name: ingestorcluster-viewer-role
12+
rules:
13+
- apiGroups:
14+
- enterprise.splunk.com
15+
resources:
16+
- ingestorclusters
17+
verbs:
18+
- get
19+
- list
20+
- watch
21+
- apiGroups:
22+
- enterprise.splunk.com
23+
resources:
24+
- ingestorclusters/status
25+
verbs:
26+
- get

helm-chart/splunk-operator/templates/rbac/role.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,32 @@ rules:
222222
- get
223223
- patch
224224
- update
225+
- apiGroups:
226+
- enterprise.splunk.com
227+
resources:
228+
- ingestorclusters
229+
verbs:
230+
- create
231+
- delete
232+
- get
233+
- list
234+
- patch
235+
- update
236+
- watch
237+
- apiGroups:
238+
- enterprise.splunk.com
239+
resources:
240+
- ingestorclusters/finalizers
241+
verbs:
242+
- update
243+
- apiGroups:
244+
- enterprise.splunk.com
245+
resources:
246+
- ingestorclusters/status
247+
verbs:
248+
- get
249+
- patch
250+
- update
225251
- apiGroups:
226252
- enterprise.splunk.com
227253
resources:

kuttl/tests/helm/index-and-ingest-separation/00-assert.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: ingestion-role-sa
6+
spec: {}

kuttl/tests/helm/index-and-ingest-separation/01-assert.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
apiVersion: enterprise.splunk.com/v4
44
kind: ClusterManager
55
metadata:
6-
name: cm
6+
name: cm-sep
77
status:
88
phase: Ready
99

@@ -12,7 +12,7 @@ status:
1212
apiVersion: apps/v1
1313
kind: StatefulSet
1414
metadata:
15-
name: splunk-cm-cluster-manager
15+
name: splunk-cm-sep-cluster-manager
1616
status:
1717
replicas: 1
1818

@@ -21,14 +21,14 @@ status:
2121
apiVersion: v1
2222
kind: Secret
2323
metadata:
24-
name: splunk-cm-cluster-manager-secret-v1
24+
name: splunk-cm-sep-cluster-manager-secret-v1
2525

2626
---
2727
# assert for indexer cluster custom resource to be ready
2828
apiVersion: enterprise.splunk.com/v4
2929
kind: IndexerCluster
3030
metadata:
31-
name: idxc
31+
name: idxc-sep
3232
pipelineConfig:
3333
remoteQueueRuleset: false
3434
ruleSet: true
@@ -77,7 +77,7 @@ status:
7777
apiVersion: apps/v1
7878
kind: StatefulSet
7979
metadata:
80-
name: splunk-idxc-indexer
80+
name: splunk-idxc-sep-indexer
8181
status:
8282
replicas: 3
8383

@@ -86,14 +86,14 @@ status:
8686
apiVersion: v1
8787
kind: Secret
8888
metadata:
89-
name: splunk-idxc-indexer-secret-v1
89+
name: splunk-idxc-sep-indexer-secret-v1
9090

9191
---
9292
# assert for indexer cluster custom resource to be ready
9393
apiVersion: enterprise.splunk.com/v4
9494
kind: IngestorCluster
9595
metadata:
96-
name: ingestor
96+
name: ingestor-sep
9797
spec:
9898
replicas: 3
9999
pipelineConfig:
@@ -144,7 +144,7 @@ status:
144144
apiVersion: apps/v1
145145
kind: StatefulSet
146146
metadata:
147-
name: splunk-ingestor-ingestor
147+
name: splunk-ingestor-sep-ingestor
148148
status:
149149
replicas: 3
150150

@@ -153,4 +153,4 @@ status:
153153
apiVersion: v1
154154
kind: Secret
155155
metadata:
156-
name: splunk-ingestor-ingestor-secret-v1
156+
name: splunk-ingestor-sep-ingestor-secret-v1

kuttl/tests/helm/index-and-ingest-separation/01-install-setup.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
apiVersion: kuttl.dev/v1beta1
33
kind: TestStep
44
commands:
5-
- command: helm install splunk-index-ingest-sep $HELM_REPO_PATH/splunk-enterprise -f splunk_index_ingest_sep.yaml
5+
- command: helm upgrade --install splunk-index-ingest-sep $HELM_REPO_PATH/splunk-enterprise -f splunk_index_ingest_sep.yaml
66
namespaced: true

0 commit comments

Comments
 (0)