Skip to content

Commit ac135b6

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

File tree

9 files changed

+91
-66
lines changed

9 files changed

+91
-66
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/splunk_index_ingest_sep.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ingestorCluster:
99
enabled: true
1010
name: ingestor
1111
replicaCount: 3
12-
# serviceAccount: ingestion-role-sa
12+
serviceAccount: ingestion-role-sa
1313
pipelineConfig:
1414
remoteQueueRuleset: false
1515
ruleSet: true
@@ -35,13 +35,13 @@ clusterManager:
3535
enabled: true
3636
name: cm
3737
replicaCount: 1
38-
# serviceAccount: ingestion-role-sa
38+
serviceAccount: ingestion-role-sa
3939

4040
indexerCluster:
4141
enabled: true
4242
name: indexer
4343
replicaCount: 3
44-
# serviceAccount: ingestion-role-sa
44+
serviceAccount: ingestion-role-sa
4545
clusterManagerRef:
4646
name: cm
4747
pipelineConfig:

0 commit comments

Comments
 (0)