Skip to content

Commit 254cbf0

Browse files
committed
CSPL-4360 Secret reference added for Bus CR
1 parent 3eb98f7 commit 254cbf0

21 files changed

+384
-159
lines changed

api/v4/bus_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ type SQSSpec struct {
6161
// +kubebuilder:validation:Pattern=`^https://sqs(?:-fips)?\.[a-z]+-[a-z]+(?:-[a-z]+)?-\d+\.amazonaws\.com(?:\.cn)?(?:/[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*)?$`
6262
// Amazon SQS Service endpoint
6363
Endpoint string `json:"endpoint"`
64+
65+
// +optional
66+
// List of remote storage volumes
67+
VolList []VolumeSpec `json:"volumes,omitempty"`
6468
}
6569

6670
// BusStatus defines the observed state of Bus

api/v4/zz_generated.deepcopy.go

Lines changed: 9 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,39 @@ spec:
7878
description: Region of the resources
7979
pattern: ^(?:us|ap|eu|me|af|sa|ca|cn|il)(?:-[a-z]+){1,3}-\d$
8080
type: string
81+
volumes:
82+
description: List of remote storage volumes
83+
items:
84+
description: VolumeSpec defines remote volume config
85+
properties:
86+
endpoint:
87+
description: Remote volume URI
88+
type: string
89+
name:
90+
description: Remote volume name
91+
type: string
92+
path:
93+
description: Remote volume path
94+
type: string
95+
provider:
96+
description: 'App Package Remote Store provider. Supported
97+
values: aws, minio, azure, gcp.'
98+
type: string
99+
region:
100+
description: Region of the remote storage volume where apps
101+
reside. Used for aws, if provided. Not used for minio
102+
and azure.
103+
type: string
104+
secretRef:
105+
description: Secret object name
106+
type: string
107+
storageType:
108+
description: 'Remote Storage type. Supported values: s3,
109+
blob, gcs. s3 works with aws or minio providers, whereas
110+
blob works with azure provider, gcs works for gcp.'
111+
type: string
112+
type: object
113+
type: array
81114
required:
82115
- dlq
83116
- name

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8368,6 +8368,40 @@ spec:
83688368
description: Region of the resources
83698369
pattern: ^(?:us|ap|eu|me|af|sa|ca|cn|il)(?:-[a-z]+){1,3}-\d$
83708370
type: string
8371+
volumes:
8372+
description: List of remote storage volumes
8373+
items:
8374+
description: VolumeSpec defines remote volume config
8375+
properties:
8376+
endpoint:
8377+
description: Remote volume URI
8378+
type: string
8379+
name:
8380+
description: Remote volume name
8381+
type: string
8382+
path:
8383+
description: Remote volume path
8384+
type: string
8385+
provider:
8386+
description: 'App Package Remote Store provider. Supported
8387+
values: aws, minio, azure, gcp.'
8388+
type: string
8389+
region:
8390+
description: Region of the remote storage volume where
8391+
apps reside. Used for aws, if provided. Not used for
8392+
minio and azure.
8393+
type: string
8394+
secretRef:
8395+
description: Secret object name
8396+
type: string
8397+
storageType:
8398+
description: 'Remote Storage type. Supported values:
8399+
s3, blob, gcs. s3 works with aws or minio providers,
8400+
whereas blob works with azure provider, gcs works
8401+
for gcp.'
8402+
type: string
8403+
type: object
8404+
type: array
83718405
required:
83728406
- dlq
83738407
- name

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4618,6 +4618,40 @@ spec:
46184618
description: Region of the resources
46194619
pattern: ^(?:us|ap|eu|me|af|sa|ca|cn|il)(?:-[a-z]+){1,3}-\d$
46204620
type: string
4621+
volumes:
4622+
description: List of remote storage volumes
4623+
items:
4624+
description: VolumeSpec defines remote volume config
4625+
properties:
4626+
endpoint:
4627+
description: Remote volume URI
4628+
type: string
4629+
name:
4630+
description: Remote volume name
4631+
type: string
4632+
path:
4633+
description: Remote volume path
4634+
type: string
4635+
provider:
4636+
description: 'App Package Remote Store provider. Supported
4637+
values: aws, minio, azure, gcp.'
4638+
type: string
4639+
region:
4640+
description: Region of the remote storage volume where
4641+
apps reside. Used for aws, if provided. Not used for
4642+
minio and azure.
4643+
type: string
4644+
secretRef:
4645+
description: Secret object name
4646+
type: string
4647+
storageType:
4648+
description: 'Remote Storage type. Supported values:
4649+
s3, blob, gcs. s3 works with aws or minio providers,
4650+
whereas blob works with azure provider, gcs works
4651+
for gcp.'
4652+
type: string
4653+
type: object
4654+
type: array
46214655
required:
46224656
- dlq
46234657
- name

helm-chart/splunk-enterprise/templates/enterprise_v4_buses.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ spec:
2929
{{- if .region }}
3030
region: {{ .region | quote }}
3131
{{- end }}
32+
{{- if .volumes }}
33+
volumes:
34+
{{ toYaml . | indent 4 }}
35+
{{- end }}
3236
{{- end }}
3337
{{- end }}
3438
{{- end }}
Lines changed: 1 addition & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,5 @@
11
---
2-
# assert for bus custom resource to be ready
3-
apiVersion: enterprise.splunk.com/v4
4-
kind: Bus
5-
metadata:
6-
name: bus
7-
spec:
8-
provider: sqs
9-
sqs:
10-
name: sqs-test
11-
region: us-west-2
12-
endpoint: https://sqs.us-west-2.amazonaws.com
13-
dlq: sqs-dlq-test
14-
status:
15-
phase: Ready
16-
17-
---
18-
# assert for large message store custom resource to be ready
19-
apiVersion: enterprise.splunk.com/v4
20-
kind: LargeMessageStore
21-
metadata:
22-
name: lms
23-
spec:
24-
provider: s3
25-
s3:
26-
endpoint: https://s3.us-west-2.amazonaws.com
27-
path: s3://ingestion/smartbus-test
28-
status:
29-
phase: Ready
30-
31-
---
32-
# assert for cluster manager custom resource to be ready
33-
apiVersion: enterprise.splunk.com/v4
34-
kind: ClusterManager
35-
metadata:
36-
name: cm
37-
status:
38-
phase: Ready
39-
40-
---
41-
# check if stateful sets are created
42-
apiVersion: apps/v1
43-
kind: StatefulSet
44-
metadata:
45-
name: splunk-cm-cluster-manager
46-
status:
47-
replicas: 1
48-
49-
---
50-
# check if secret object are created
51-
apiVersion: v1
52-
kind: Secret
53-
metadata:
54-
name: splunk-cm-cluster-manager-secret-v1
55-
56-
---
57-
# assert for indexer cluster custom resource to be ready
58-
apiVersion: enterprise.splunk.com/v4
59-
kind: IndexerCluster
60-
metadata:
61-
name: indexer
62-
spec:
63-
replicas: 3
64-
busRef:
65-
name: bus
66-
status:
67-
phase: Ready
68-
bus:
69-
provider: sqs
70-
sqs:
71-
name: sqs-test
72-
region: us-west-2
73-
endpoint: https://sqs.us-west-2.amazonaws.com
74-
dlq: sqs-dlq-test
75-
largeMessageStore:
76-
provider: s3
77-
s3:
78-
endpoint: https://s3.us-west-2.amazonaws.com
79-
path: s3://ingestion/smartbus-test
80-
81-
---
82-
# check for stateful set and replicas as configured
83-
apiVersion: apps/v1
84-
kind: StatefulSet
85-
metadata:
86-
name: splunk-indexer-indexer
87-
status:
88-
replicas: 3
89-
90-
---
91-
# check if secret object are created
92-
apiVersion: v1
93-
kind: Secret
94-
metadata:
95-
name: splunk-indexer-indexer-secret-v1
96-
97-
---
98-
# assert for indexer cluster custom resource to be ready
99-
apiVersion: enterprise.splunk.com/v4
100-
kind: IngestorCluster
101-
metadata:
102-
name: ingestor
103-
spec:
104-
replicas: 3
105-
busRef:
106-
name: bus
107-
status:
108-
phase: Ready
109-
bus:
110-
provider: sqs
111-
sqs:
112-
name: sqs-test
113-
region: us-west-2
114-
endpoint: https://sqs.us-west-2.amazonaws.com
115-
dlq: sqs-dlq-test
116-
largeMessageStore:
117-
provider: s3
118-
s3:
119-
endpoint: https://s3.us-west-2.amazonaws.com
120-
path: s3://ingestion/smartbus-test
121-
122-
---
123-
# check for stateful set and replicas as configured
124-
apiVersion: apps/v1
125-
kind: StatefulSet
126-
metadata:
127-
name: splunk-ingestor-ingestor
128-
status:
129-
replicas: 3
130-
131-
---
132-
# check if secret object are created
1332
apiVersion: v1
1343
kind: Secret
1354
metadata:
136-
name: splunk-ingestor-ingestor-secret-v1
5+
name: s3-secret
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
commands:
5+
- script: kubectl create secret generic s3-secret --from-literal=s3_access_key=$AWS_ACCESS_KEY_ID --from-literal=s3_secret_key=$AWS_SECRET_ACCESS_KEY --namespace $NAMESPACE
6+
background: false
7+
skipLogOutput: true

0 commit comments

Comments
 (0)