package
0.0.0-20250205134457-ada76d566b7b
Repository: https://github.com/splunk/splunk-operator.git
Documentation: pkg.go.dev

# Functions

AppFrameWorkVerifications will perform several verifications needed between the different steps of App Framework tests.
CheckIndexerOnCM check given Indexer on cluster manager.
CheckLicenseManagerConfigured checks if lm is configured on given pod.
CheckMCPodReady check if monitoring pod is ready.
CheckPodNameInString checks for pod name in string.
CheckPodNameOnMC Check given pod is configured on Monitoring console pod.
CheckPrefixExistsOnGCP checks if a prefix exists in a GCP bucket.
CheckPrefixExistsOnS3 lists object in a bucket.
CheckRFSF check if cluster has met replication factor and search factor.
CheckRollingRestartStatus checks if rolling restart is happening in cluster.
CheckSearchHeadOnCM check given search head on cluster manager.
CheckSearchHeadRemoved check if search head is removed from Indexer Cluster.
CheckSecretViaAPI check if secret (hec token or password) can be used to access api.
CheckStringInSlice check if string is present in a slice.
ClusterManagerInfoResponse Get cluster Manager response.
ClusterManagerReady verify Cluster Manager Instance is in ready status.
ClusterMasterReady verify Cluster Master Instance is in ready status.
CMBundlePushstatus Check for bundle push status on ClusterManager.
CompareStringSlices checks if two string slices are matching.
ComputeHMACSHA256 generates a hash signature for an HTTP request or for a SAS.
CopyFileToPod copies a file locally from srcPath to the destPath on the pod specified in podName.
CreateAnIndexStandalone creates an index on a standalone instance using the CLI.
CreateBucketAndPathIfNotExist creates a bucket and path if they do not exist.
CreateDummyFileOnOperator creates a dummy file of specified size at path provided.
CreateMockLogfile creates a mock logfile with n entries to be ingested.
DecryptSplunkEncodedSecret Decrypt Splunk Secret like pass4SymmKey On Given Pod.
DeleteConfigMap Delete configMap in the namespace.
DeleteFileOnGCP deletes a single file from a GCP bucket.
DeleteFileOnS3 Delete a given file on S3 Bucket.
DeleteFilesOnGCP deletes a list of files from a GCP bucket.
DeleteFilesOnOperatorPod Delete files on Operator Pod.
DeleteFilesOnS3 Delete a list of file on S3 Bucket.
DeleteMCPod delete monitoring console deployment.
DeleteOperatorPod Delete Operator Pod in the namespace.
DeletePod Delete pod in the namespace.
DeleteSecretObject Deletes the entire secret object.
DeleteSHC delete Search Head Cluster in given namespace.
DeployerAppChecksum Get the checksum for each app on the deployer.
DeployerBundlePushstatus Get the bundle push status on Deployer.
DisableAppsOnAzure untar apps, modify their conf file to disable them, re-tar and upload the disabled version to Azure.
DisableAppsToGCP untars apps, modifies their config files to disable them, re-tars, and uploads the disabled versions to GCP.
DisableAppsToS3 untar apps, modify their conf file to disable them, re-tar and upload the disabled version to S3.
DownloadFileFromGCP downloads a file from a GCP bucket to a local directory.
DownloadFileFromS3 downloads file from S3.
DownloadFilesFromAzure downloads given list of files from Azure.
DownloadFilesFromGCP downloads a list of files from a GCP bucket to a local directory.
DownloadFilesFromS3 download given list of files from S3 to the given directory.
DownloadLicenseFromAzure downloads an enterprise license file from an Azure Storage Account container.
DownloadLicenseFromGCPBucket downloads the license file from GCP.
DownloadLicenseFromS3Bucket downloads license file from S3.
DumpDescribePods prints and returns list of pods in the namespace.
DumpGetPods prints and returns list of pods in the namespace.
DumpGetPvcs prints and returns list of pvcs in the namespace.
DumpGetSplunkVersion prints the splunk version installed on pods.
DumpGetTopNodes prints and returns Node load information.
DumpGetTopPods prints and returns Node load information.
ExecuteCommandOnOperatorPod execute command on given pod and return result.
ExecuteCommandOnPod execute command on given pod and return result.
GenerateAppFrameworkSpec Generate Appframework spec.
GenerateAppSourceSpec return AppSourceSpec struct with given values.
GenerateIndexSpec return VolumeSpec struct with given values.
GenerateIndexVolumeSpec return VolumeSpec struct with given values.
GenerateIndexVolumeSpecAzure return VolumeSpec struct with given values for Azure.
GenerateIndexVolumeSpecAzureManagedID return VolumeSpec struct with given values for Azure using Managed Identities.
GeneratePodNameSlice returns slice of PodNames based on given key and count.
GetAppDeploymentInfo returns AppDeploymentInfo for given CR Kind, appSourceName and appName.
GetAppDeploymentInfoClusterManager returns AppDeploymentInfo for given Cluster Manager, appSourceName and appName.
GetAppDeploymentInfoClusterMaster returns AppDeploymentInfo for given Cluster Manager, appSourceName and appName.
GetAppDeploymentInfoMonitoringConsole returns AppDeploymentInfo for given Monitoring Console, appSourceName and appName.
GetAppDeploymentInfoSearchHeadCluster returns AppDeploymentInfo for given Search Head Cluster, appSourceName and appName.
GetAppDeploymentInfoStandalone returns AppDeploymentInfo for given standalone, appSourceName and appName.
GetAppFileList Get the Versioned App file list for app Names.
GetAppframeworkManualUpdateConfigMap gets config map for given manual update configmap.
GetAzureEndpoint returns Azure endpoint.
GetClusterManagerBundleHash Get the Active bundle hash on ClusterManager.
GetConfigMap Gets the config map for a given k8 config map name.
GetConfiguredPeers get list of Peers Configured on Montioring Console.
GetConfLineFromPod gets given config from file on POD.
GetDefaultAzureRegion returns default Azure Region.
GetDefaultGCPRegion returns the default GCP Region.
GetDefaultS3Region returns default AWS Region.
GetDirsOrFilesInPath returns subdirectory under given path on the given POD.
GetFileListOnGCP lists objects in a GCP bucket with the given prefix.
GetFileListOnS3 lists object in a bucket.
GetFilesInPathOnGCP retrieves a list of file names under a given path in a GCP bucket.
GetFilesInPathOnS3 return list of file name under a given path on S3.
GetGCPEndpoint returns GCP Storage endpoint.
GetIndexersOrSearchHeadsOnCM get indexers or search head on Cluster Manager.
GetIndexOnPod get list of indexes on given pod.
GetIsDeploymentInProgressFlag returns IsDeploymentInProgress for given CR Name, CR Kind.
GetKeysToMatch retuns slice of secrets in server conf based on pod name.
GetMCConfigMap gets config map for give Monitoring Console Name.
GetMountedKey Gets the key mounted on pod.
GetOperatorDirsOrFilesInPath returns subdirectory under given path on the given POD.
GetOperatorPodName returns name of operator pod in the namespace.
GetPodAppbtoolStatus Get the app btool status.
GetPodAppInstallStatus Get the app install status.
GetPodAppStatus Get the app install status and version number.
GetPodInstalledAppVersion Get the version of the app installed on pod.
GetPodIP returns IP address of a POD as a string.
GetPodsStartTime prints and returns list of pods in namespace and their respective start time.
GetRandomeHECToken generates a random HEC token.
GetResourceVersion get resource version id.
GetS3Endpoint return s3 endpoint for smartstore test.
GetSearchResults retrieve the results for a given <sid> once the search status isDone == true.
GetSearchStatus checks the search status for a given <sid>.
GetSecretDataMap return the map with given secret values.
GetSecretFromInputsConf gets give secret from server under given stanza.
GetSecretFromServerConf gets give secret from server under given stanza.
GetSecretStruct Gets the secret struct for a given k8 secret name.
GetServiceDataIndexes returns output of services data indexes.
GetSmartStoreIndexesBucet returns smartstore test bucket name.
GetSmartStoreIndexesBucket returns the SmartStore test bucket name.
GetVersionedSecretNames retuns list of versioned secrets of given namespace and version.
IndexerClusterMultisiteStatus verify indexer Cluster is configured as multisite.
IndexersReady verify indexers of all sites go to ready state.
IngestFileViaMonitor ingests a file into an instance using the monitor CLI.
IngestFileViaOneshot ingests a file into an instance using the oneshot CLI.
LicenseManagerReady verify LM is in ready status and does not flip flop.
LicenseMasterReady verify LM is in ready status and does not flip flop.
ListFilesonAzure list the files present in an Azure Storage account container.
ModifySecretObject Modifies the secret object with given data.
NewDefaultTestCaseEnv creates a default test environment.
NewDefaultTestEnv creates a default test environment.
NewGCPClient initializes and returns a GCPClient.
NewTestCaseEnv creates a new test environment to run tests againsts.
NewTestEnv creates a new test environment to run tests againsts.
PerformSearchReq makes a search request for a search to be performed.
PerformSearchSync performs a syncronous search within splunk and returns the search results.
RandomDNSName returns a random string that is a valid DNS name.
RestartSplunk Restart splunk inside the container.
RollHotBuckets roll hot buckets in cluster.
RollHotToWarm rolls hot buckets to warm for a given index and pod.
S3Session Create session object for S3 bucket connection.
SearchHeadClusterReady verify SHC is in READY status and does not flip-flop.
SHCInNamespace returns true if SHC is present in namespace.
SingleSiteIndexersReady verify single site indexers go to ready state.
StandaloneReady verify Standalone is in ReadyStatus and does not flip-flop.
UploadFilesToAzure upload given list of files to given location on an Azure Storage Container.
UploadFilesToGCP uploads a list of files to a specified path in a GCP bucket.
UploadFilesToS3 upload given list of file to given location on a S3 bucket.
UploadFileToAzure uploads a file to an Azure Storage Account container.
UploadFileToGCP uploads a file to a GCP bucket.
UploadFileToS3 upload file to S3.
VerifyAppInstalled verify that app of specific version is installed.
VerifyAppListPhase verify given app Phase has completed for the given list of apps for given CR Kind.
VerifyAppRepoState verify given app repo state is equal to given value for app for given CR Kind.
VerifyAppsCopied verify that apps are copied to correct location based on POD.
VerifyAppsDownloadedOnContainer verify that apps are downloaded by init container.
VerifyAppsInFolder verify that apps are present in folder.
VerifyAppsPackageDeletedOnContainer verify that apps are deleted by container.
VerifyAppsPackageDeletedOnOperatorContainer verify that apps are deleted by container.
VerifyAppState verify given app state is in between states passed as parameters, i.e when Status is between 101 and 303 we would pass enterpriseApi.AppPkgInstallComplete and enterpriseApi.AppPkgPodCopyComplete.
VerifyClusterManagerBundlePush verify that bundle push was pushed on all indexers.
VerifyClusterManagerPhase verify phase of cluster manager.
VerifyClusterMasterPhase verify phase of cluster manager.
VerifyConfOnPod Verify give conf and value on config file on pod.
VerifyCPULimits verifies value of CPU limits is as expected.
VerifyCustomResourceVersionChanged verify the version id.
VerifyDeployerBundlePush verify that bundle push was pushed on all search heads.
VerifyFilesInDirectoryOnPod verify that files are present in folder.
VerifyIndexConfigsMatch verify index specific config.
VerifyIndexerClusterPhase verify the phase of idxc matches the given phase.
VerifyIndexExistsOnS3 Verify Index Exists on S3.
VerifyIndexFoundOnPod verify index found on a given POD.
VerifyIsDeploymentInProgressFlagIsSet verify IsDeploymentInProgress flag is set to true.
VerifyLMConfiguredOnPod verify LM is configured on given POD.
VerifyMonitoringConsolePhase verify the phase of Monitoring Console CR.
VerifyMonitoringConsoleReady verify Monitoring Console CR is in Ready Status and does not flip-flop.
VerifyNoDisconnectedSHPresentOnCM is present on cluster manager.
VerifyNoPodReset verify that no pod reset during App install using phase3 framework.
VerifyNoSHCInNamespace verify no SHC is present in namespace.
VerifyPodsInMCConfigMap checks if given pod names are present in given KEY of given MC's Config Map.
VerifyPodsInMCConfigString checks if given pod names are present in given KEY of given MC's Config Map.
VerifyPVC verifies if PVC exists or not.
VerifyPVCsPerDeployment verifies for a given deployment if PVCs (etc and var) exists.
VerifyResourceConstraints verifies value of CPU limits is as expected.
VerifyRFSFMet verify RF SF is met on cluster manager.
VerifyRollingRestartFinished verify no rolling restart is active.
VerifySearchHeadClusterPhase verify the phase of SHC matches given phase.
VerifySecretsOnPods Check whether the secret object info is mounted on given pods Set match to true or false to indicate desired +ve or -ve match.
VerifySecretsOnSecretObjects Compare secret value on passed in map to value present on secret object.
VerifyServiceAccountConfiguredOnPod check if given service account is configured on given pod.
VerifySplunkInputConfSecrets Compare secret value on passed in map to value present on input.conf for given indexer or standalone pods Set match to true or false to indicate desired +ve or -ve match.
VerifySplunkSecretViaAPI check if keys can be used to access api i.e validate they are authentic.
VerifySplunkServerConfSecrets Compare secret value on passed in map to value present on server.conf for given pods and secrets Set match to true or false to indicate desired +ve or -ve match.
VerifyStandalonePhase verify the phase of Standalone CR.
WaitForAppInstall waits until an app is correctly installed (having status equal to 303).
WaitforAppInstallState Wait for App to reach state specified in conf file.
WaitforPhaseChange Wait for 2 mins or when phase change on is seen on a CR for any particular app.
WaitForSplunkPodCleanup Wait for cleanup to happend.

# Constants

AppframeworkManualUpdateConfigMap Config map for App Framework manual update.
ClusterManagerPod ClusterManager Pod Template String.
ClusterManagerServiceName Cluster Manager Service Template String.
ClusterMasterPod ClusterMaster Pod Template String.
ClusterMasterServiceName Cluster Master Service Template String.
ConsistentDuration is use to check a state is stable.
ConsistentPollInterval is the interval to use to consistently check a state is stable.
CRUpdateRetryCount if CR Update fails retry these many time.
DefaultStorageClassName is the storage class for PVC for downloading apps on operator.
DefaultStorageForAppDownloads is used to specify the default storage for downloading apps on the operator pod.
DefaultTimeout is the max timeout before we failed.
DeployerPod Template String for deployer pod.
DeployerServiceName Cluster Manager Service Template String.
IndexerPod Template String for indexer pod.
LicenseManagerPod Template String for standalone pod.
LicenseMasterPod Template String for standalone pod.
MonitoringConsolePod Monitoring Console Pod Template String.
MonitoringConsoleSts Monitoring Console Statefulset Template.
MultiSiteIndexerPod Indexer Pod Template String.
NamespaceScopedSecretObjectName Name Space Scoped Secret object Template.
PollInterval specifies the polling interval.
PVCString Template String for PVC.
SearchHeadPod Template String for search head pod.
StandalonePod Template String for standalone pod.
VersionedSecretName Versioned Secret object Template.

# Variables

AppDownloadVolume location on Operator pod for App framework downloads.
AppInfo Installation info on Apps.
AppLocationDisabledApps Location of apps on S3 for Disabled Apps.
AppLocationV1 Location of apps on S3 for V1 Apps.
AppLocationV2 Location of apps on S3 for V2 Apps.
AppStagingLocOnPod is the volume on Splunk pod where apps will be copied from operator.
BasicApps Apps that require no restart to be installed.
BigSingleApp is 1 app with bigger size to perform tests while installation is in progress.
Set Global Variables.
ExtraApps is 2 apps to be added to app source during app installa in progress.
HTTPCodes Response codes for http request.
NewAppsAddedBetweenPolls Apps to be installed as poll after.
OperatorFSGroup is the fsGroup value for Splunk Operator.
PVTestApps is a group of 100MB-size apps used to test Operator PV.
PVTestAppsLocation stores location of 100mb-size apps used to test Operator PV.
Set Azure Variables.
RestartNeededApps Apps that require restart to be installed.
SecretAPIRequests map to convert secretName to respective api requests.
SecretKeytoServerConfStanza map to convert secretName to server conf stanza.
SpecifiedTestTimeout exported test timeout time as this can be configured per test case if needed.
Set Azure Variables.
Set Azure Variables.
Set Azure Variables.

# Structs

AppSourceInfo holds info related to app sources.
AzureBlobClient is a client to implement Azure Blob specific APIs.
ClusterManagerHealthContent represents detailed information about a site.
ClusterManagerHealthEntry represents a site of an indexer cluster with its metadata.
ClusterManagerHealthResponse is a representation of the health response by a Splunk cluster-manager Endpoint: /services/cluster/manager/health.
ClusterManagerInfoEndpointResponse is represtentation of /services/cluster/manager/info endpoint.
ClusterManagerPeersAndSearchHeadResponse /services/cluster/manager/peers and /services/cluster/manager/searchhead response.
ClusterManagerSitesContent represents detailed information about a site.
ClusterManagerSitesEntry represents a site of an indexer cluster with its metadata.
ClusterManagerSitesPeer reprensents an indexer peer member of a site.
ClusterManagerSitesResponse is a representation of the sites managed by a Splunk cluster-manager Endpoint: /services/cluster/manager/sites.
DataIndexesResponse struct for /data/indexes response.
Deployment simply represents the deployment (standalone, clustered,...etc) we create on the testenv.
GCPClient wraps the GCP Storage client.
IndexEntry struct of index data response returned by /data/indexes endpoint.
PodDetailsStruct captures output of kubectl get pods podname -o json.
RemoteDataDownloadRequest struct specifies the remote data file path, local file path where the downloaded data should be written as well as the etag data if available.
SearchJobResponseFields represents the fields in results from non-transforming searches.
SearchJobResponseResults represents the results from non-transforming searches.
SearchJobResultsResponse represents the search results on non-transforming searches.
SearchJobStatusContent represents the search metadata returned as part of the search status.
SearchJobStatusEntry represents the metadata for a given sid returned as part of the search status.
SearchJobStatusResponse represents the search status returned by splunk for endpoint: https://localhost:8089/services/search/jobs/<sid>.
TestCaseEnv represents a namespaced-isolated k8s cluster environment (aka virtual k8s cluster) to run test cases against.
TestEnv represents a namespaced-isolated k8s cluster environment (aka virtual k8s cluster) to run tests against.

# Interfaces

SplunkHTTPClient defines the interface used by SplunkClient.