Skip to content

Commit

Permalink
Create a new folder for helm SVA testing only
Browse files Browse the repository at this point in the history
  • Loading branch information
akondur committed Nov 15, 2024
1 parent d6ccab9 commit 6ea3964
Show file tree
Hide file tree
Showing 29 changed files with 445 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kuttl/tests/helm_sva/c3/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# assert for splunk operator deployment to be ready
apiVersion: apps/v1
kind: Deployment
metadata:
name: splunk-operator-controller-manager
status:
readyReplicas: 1
availableReplicas: 1
6 changes: 6 additions & 0 deletions kuttl/tests/helm_sva/c3/00-install-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: ../script/installoperator.sh
background: false
90 changes: 90 additions & 0 deletions kuttl/tests/helm_sva/c3/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
# assert for cluster manager custom resource to be ready
apiVersion: enterprise.splunk.com/v4
kind: ClusterManager
metadata:
name: cm
status:
phase: Ready

---
# check if stateful sets are created
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: splunk-cm-cluster-manager
status:
replicas: 1

---
# check if secret object are created
apiVersion: v1
kind: Secret
metadata:
name: splunk-cm-cluster-manager-secret-v1

---
# assert for indexer cluster custom resource to be ready
apiVersion: enterprise.splunk.com/v4
kind: IndexerCluster
metadata:
name: idxc
status:
phase: Ready

---
# check for stateful set and replicas as configured
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: splunk-idxc-indexer
status:
replicas: 3

---
# check if secret object are created
apiVersion: v1
kind: Secret
metadata:
name: splunk-idxc-indexer-secret-v1

---
# assert for SearchHeadCluster custom resource to be ready
apiVersion: enterprise.splunk.com/v4
kind: SearchHeadCluster
metadata:
name: shc
status:
phase: Ready

---
# check if secret object are created
apiVersion: v1
kind: Secret
metadata:
name: splunk-shc-deployer-secret-v1

---
# check if secret object are created
apiVersion: v1
kind: Secret
metadata:
name: splunk-shc-search-head-secret-v1

---
# check for stateful set and replicas as configured
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: splunk-shc-search-head
status:
replicas: 3

---
# check for statefull set
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: splunk-shc-deployer
status:
replicas: 1
6 changes: 6 additions & 0 deletions kuttl/tests/helm_sva/c3/01-install-c3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: helm install splunk-c3 $HELM_REPO_PATH/splunk-enterprise -f c3_config.yaml
namespaced: true
17 changes: 17 additions & 0 deletions kuttl/tests/helm_sva/c3/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
# assert for indexer cluster custom resource to be ready
apiVersion: enterprise.splunk.com/v4
kind: IndexerCluster
metadata:
name: idxc
status:
phase: Ready

---
# check for stateful sets and replicas updated
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: splunk-idxc-indexer
status:
replicas: 4
5 changes: 5 additions & 0 deletions kuttl/tests/helm_sva/c3/02-scaleup-c3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: helm upgrade splunk-c3 $HELM_REPO_PATH/splunk-enterprise --reuse-values --set indexerCluster.replicaCount=4
namespaced: true
5 changes: 5 additions & 0 deletions kuttl/tests/helm_sva/c3/03-uninstall-c3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: helm uninstall splunk-c3
namespaced: true
41 changes: 41 additions & 0 deletions kuttl/tests/helm_sva/c3/c3_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
splunk-operator:
enabled: false
splunkOperator:
clusterWideAccess: false
persistentVolumeClaim:
storageClassName: gp2

sva:
c3:
enabled: true

clusterManager:
name: cm

indexerClusters:
- name: idxc

searchHeadClusters:
- name: shc


indexerCluster:
enabled: true
additionalLabels:
label: "true"
additionalAnnotations:
annotation: "true"

clusterManager:
enabled: true
additionalLabels:
label: "true"
additionalAnnotations:
annotation: "true"

searchHeadCluster:
enabled: true
additionalLabels:
label: "true"
additionalAnnotations:
annotation: "true"
15 changes: 15 additions & 0 deletions kuttl/tests/helm_sva/c3/c3_scale_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
splunk-operator:
enabled: false
sva:
c3:
enabled: true

clusterManager:
name: cm

indexerClusters:
- name: idxc
replicaCount: 4

searchHeadClusters:
- name: shc
6 changes: 6 additions & 0 deletions kuttl/tests/helm_sva/m4/00-install-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: ../script/installoperator.sh
background: false
84 changes: 84 additions & 0 deletions kuttl/tests/helm_sva/m4/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@

---
# assert for cluster manager custom resource to be ready
apiVersion: enterprise.splunk.com/v4
kind: ClusterManager
metadata:
name: cm
status:
phase: Ready

---
# check for stateful set
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: splunk-cm-cluster-manager
status:
replicas: 1

---
# check if secret object is created
apiVersion: v1
kind: Secret
metadata:
name: splunk-cm-cluster-manager-secret-v1

---
# assert for indexer cluster custom resource to be ready
apiVersion: enterprise.splunk.com/v4
kind: IndexerCluster
metadata:
name: idx1
status:
phase: Ready

---
# assert for indexer cluster custom resource to be ready
apiVersion: enterprise.splunk.com/v4
kind: IndexerCluster
metadata:
name: idx2
status:
phase: Ready

---
# assert for SearchHeadCluster custom resource to be ready
apiVersion: enterprise.splunk.com/v4
kind: SearchHeadCluster
metadata:
name: shc1
status:
phase: Ready

---
# check if secret object is created
apiVersion: v1
kind: Secret
metadata:
name: splunk-shc1-deployer-secret-v1

---
# check if secret object is created
apiVersion: v1
kind: Secret
metadata:
name: splunk-shc1-search-head-secret-v1

---
# check for stateful set and replicas
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: splunk-shc1-search-head
status:
replicas: 3

---
# check for stateful set
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: splunk-shc1-deployer
status:
replicas: 1
6 changes: 6 additions & 0 deletions kuttl/tests/helm_sva/m4/01-install-m4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: helm install splunk-m4 $HELM_REPO_PATH/splunk-enterprise -f m4_config.yaml
namespaced: true
5 changes: 5 additions & 0 deletions kuttl/tests/helm_sva/m4/02-uninstall-m4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: helm uninstall splunk-m4
namespaced: true
28 changes: 28 additions & 0 deletions kuttl/tests/helm_sva/m4/m4_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
splunk-operator:
enabled: false
splunkOperator:
clusterWideAccess: false
persistentVolumeClaim:
storageClassName: gp2
sva:
m4:
enabled: true

clusterManager:
name: cm
allSites: "site1,site2"
site: site1
zone: us-west-2d

indexerClusters:
- name: idx1
site: site1
zone: us-west-2d
- name: idx2
site: site2
zone: us-west-2b

searchHeadClusters:
- name: shc1
site: site2
zone: us-west-2b
6 changes: 6 additions & 0 deletions kuttl/tests/helm_sva/s1/00-install-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: ../script/installoperator.sh
background: false
6 changes: 6 additions & 0 deletions kuttl/tests/helm_sva/s1/00-install-service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: helm-service-account
spec: {}
7 changes: 7 additions & 0 deletions kuttl/tests/helm_sva/s1/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# check for standalone to be in ready state
apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
name: stdln
status:
phase: Ready
7 changes: 7 additions & 0 deletions kuttl/tests/helm_sva/s1/01-install-standalone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: helm install splunk-stdl $HELM_REPO_PATH/splunk-enterprise --set splunk-operator.enabled=false --set standalone.enabled=true
namespaced: true
spec:
serviceAccount: helm-service-account
7 changes: 7 additions & 0 deletions kuttl/tests/helm_sva/s1/02-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# check for standalone to be scaled
apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
name: stdln
status:
replicas: 2
7 changes: 7 additions & 0 deletions kuttl/tests/helm_sva/s1/02-scaleup-standalone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: helm upgrade --set standalone.replicaCount=2 --set splunk-operator.enabled=false --set standalone.enabled=true splunk-stdl ../../../../helm-chart/splunk-enterprise
namespaced: true
spec:
serviceAccount: helm-service-account
7 changes: 7 additions & 0 deletions kuttl/tests/helm_sva/s1/03-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# check for standalone to be scaled down
apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
name: stdln
status:
replicas: 1
Loading

0 comments on commit 6ea3964

Please sign in to comment.