Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSPL-320: Smartstore Config #105

Merged
merged 1 commit into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions deploy/crds/enterprise.splunk.com_indexerclusters_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,38 @@ spec:
type: object
type: object
type: object
smartstore:
description: Splunk Smartstore configuration. Refer to indexes.conf.spec
on docs.splunk.com
properties:
indexes:
description: List of Splunk indexes
items:
description: IndexSpec defines Splunk index name and storage path
properties:
location:
description: Index location on the remote storage path
type: string
name:
description: Splunk index name
type: string
type: object
type: array
volumes:
description: List of remote storage volumes
items:
description: VolumeSpec defines remote volume name and remote
volume URI
properties:
endpoint:
description: Remote volume URI
type: string
name:
description: Remote volume name
type: string
type: object
type: array
type: object
storageClassName:
description: Name of StorageClass to use for persistent volume claims
type: string
Expand Down Expand Up @@ -2309,6 +2341,38 @@ spec:
description: Indicates whether the master is ready to begin servicing,
based on whether it is initialized.
type: boolean
smartstore:
description: Splunk Smartstore configuration. Refer to indexes.conf.spec
on docs.splunk.com
properties:
indexes:
description: List of Splunk indexes
items:
description: IndexSpec defines Splunk index name and storage path
properties:
location:
description: Index location on the remote storage path
type: string
name:
description: Splunk index name
type: string
type: object
type: array
volumes:
description: List of remote storage volumes
items:
description: VolumeSpec defines remote volume name and remote
volume URI
properties:
endpoint:
description: Remote volume URI
type: string
name:
description: Remote volume name
type: string
type: object
type: array
type: object
type: object
type: object
version: v1alpha3
Expand Down
64 changes: 64 additions & 0 deletions deploy/crds/enterprise.splunk.com_standalones_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,38 @@ spec:
type: object
type: object
type: object
smartstore:
description: Splunk Smartstore configuration. Refer to indexes.conf.spec
on docs.splunk.com
properties:
indexes:
description: List of Splunk indexes
items:
description: IndexSpec defines Splunk index name and storage path
properties:
location:
description: Index location on the remote storage path
type: string
name:
description: Splunk index name
type: string
type: object
type: array
volumes:
description: List of remote storage volumes
items:
description: VolumeSpec defines remote volume name and remote
volume URI
properties:
endpoint:
description: Remote volume URI
type: string
name:
description: Remote volume name
type: string
type: object
type: array
type: object
sparkImage:
description: Image to use for Spark pod containers (overrides RELATED_IMAGE_SPLUNK_SPARK
environment variables)
Expand Down Expand Up @@ -2289,6 +2321,38 @@ spec:
selector:
description: selector for pods, used by HorizontalPodAutoscaler
type: string
smartstore:
description: Splunk Smartstore configuration. Refer to indexes.conf.spec
on docs.splunk.com
properties:
indexes:
description: List of Splunk indexes
items:
description: IndexSpec defines Splunk index name and storage path
properties:
location:
description: Index location on the remote storage path
type: string
name:
description: Splunk index name
type: string
type: object
type: array
volumes:
description: List of remote storage volumes
items:
description: VolumeSpec defines remote volume name and remote
volume URI
properties:
endpoint:
description: Remote volume URI
type: string
name:
description: Remote volume name
type: string
type: object
type: array
type: object
type: object
type: object
version: v1alpha3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,38 @@ spec:
type: object
type: object
type: object
smartstore:
description: Splunk Smartstore configuration. Refer to indexes.conf.spec
on docs.splunk.com
properties:
indexes:
description: List of Splunk indexes
items:
description: IndexSpec defines Splunk index name and storage path
properties:
location:
description: Index location on the remote storage path
type: string
name:
description: Splunk index name
type: string
type: object
type: array
volumes:
description: List of remote storage volumes
items:
description: VolumeSpec defines remote volume name and remote
volume URI
properties:
endpoint:
description: Remote volume URI
type: string
name:
description: Remote volume name
type: string
type: object
type: array
type: object
storageClassName:
description: Name of StorageClass to use for persistent volume claims
type: string
Expand Down Expand Up @@ -2309,6 +2341,38 @@ spec:
description: Indicates whether the master is ready to begin servicing,
based on whether it is initialized.
type: boolean
smartstore:
description: Splunk Smartstore configuration. Refer to indexes.conf.spec
on docs.splunk.com
properties:
indexes:
description: List of Splunk indexes
items:
description: IndexSpec defines Splunk index name and storage path
properties:
location:
description: Index location on the remote storage path
type: string
name:
description: Splunk index name
type: string
type: object
type: array
volumes:
description: List of remote storage volumes
items:
description: VolumeSpec defines remote volume name and remote
volume URI
properties:
endpoint:
description: Remote volume URI
type: string
name:
description: Remote volume name
type: string
type: object
type: array
type: object
type: object
type: object
version: v1alpha3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,38 @@ spec:
type: object
type: object
type: object
smartstore:
description: Splunk Smartstore configuration. Refer to indexes.conf.spec
on docs.splunk.com
properties:
indexes:
description: List of Splunk indexes
items:
description: IndexSpec defines Splunk index name and storage path
properties:
location:
description: Index location on the remote storage path
type: string
name:
description: Splunk index name
type: string
type: object
type: array
volumes:
description: List of remote storage volumes
items:
description: VolumeSpec defines remote volume name and remote
volume URI
properties:
endpoint:
description: Remote volume URI
type: string
name:
description: Remote volume name
type: string
type: object
type: array
type: object
sparkImage:
description: Image to use for Spark pod containers (overrides RELATED_IMAGE_SPLUNK_SPARK
environment variables)
Expand Down Expand Up @@ -2289,6 +2321,38 @@ spec:
selector:
description: selector for pods, used by HorizontalPodAutoscaler
type: string
smartstore:
description: Splunk Smartstore configuration. Refer to indexes.conf.spec
on docs.splunk.com
properties:
indexes:
description: List of Splunk indexes
items:
description: IndexSpec defines Splunk index name and storage path
properties:
location:
description: Index location on the remote storage path
type: string
name:
description: Splunk index name
type: string
type: object
type: array
volumes:
description: List of remote storage volumes
items:
description: VolumeSpec defines remote volume name and remote
volume URI
properties:
endpoint:
description: Remote volume URI
type: string
name:
description: Remote volume name
type: string
type: object
type: array
type: object
type: object
type: object
version: v1alpha3
Expand Down
27 changes: 27 additions & 0 deletions pkg/apis/enterprise/v1alpha3/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,30 @@ type CommonSplunkSpec struct {
// IndexerClusterRef refers to a Splunk Enterprise indexer cluster managed by the operator within Kubernetes
IndexerClusterRef corev1.ObjectReference `json:"indexerClusterRef"`
}

// SmartStoreSpec defines Splunk indexes and remote storage volume configuration
type SmartStoreSpec struct {
// List of remote storage volumes
VolList []VolumeSpec `json:"volumes,omitempty"`

// List of Splunk indexes
IndexList []IndexSpec `json:"indexes,omitempty"`
}

// VolumeSpec defines remote volume name and remote volume URI
type VolumeSpec struct {
// Remote volume name
Name string `json:"name"`

// Remote volume URI
Endpoint string `json:"endpoint"`
}

// IndexSpec defines Splunk index name and storage path
type IndexSpec struct {
// Splunk index name
Name string `json:"name"`

// Index location on the remote storage path
RemoteLocation string `json:"location"`
}
6 changes: 6 additions & 0 deletions pkg/apis/enterprise/v1alpha3/indexercluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ type IndexerClusterSpec struct {

// Number of search head pods; a search head cluster will be created if > 1
Replicas int32 `json:"replicas"`

// Splunk Smartstore configuration. Refer to indexes.conf.spec on docs.splunk.com
SmartStore SmartStoreSpec `json:"smartstore,omitempty"`
}

// IndexerClusterMemberStatus is used to track the status of each indexer cluster peer.
Expand Down Expand Up @@ -88,6 +91,9 @@ type IndexerClusterStatus struct {

// status of each indexer cluster peer
Peers []IndexerClusterMemberStatus `json:"peers"`

// Splunk Smartstore configuration. Refer to indexes.conf.spec on docs.splunk.com
SmartStore SmartStoreSpec `json:"smartstore,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/enterprise/v1alpha3/standalone_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ type StandaloneSpec struct {

// Image to use for Spark pod containers (overrides RELATED_IMAGE_SPLUNK_SPARK environment variables)
SparkImage string `json:"sparkImage"`

// Splunk Smartstore configuration. Refer to indexes.conf.spec on docs.splunk.com
SmartStore SmartStoreSpec `json:"smartstore,omitempty"`
}

// StandaloneStatus defines the observed state of a Splunk Enterprise standalone instances.
Expand All @@ -57,6 +60,9 @@ type StandaloneStatus struct {

// selector for pods, used by HorizontalPodAutoscaler
Selector string `json:"selector"`

// Splunk Smartstore configuration. Refer to indexes.conf.spec on docs.splunk.com
SmartStore SmartStoreSpec `json:"smartstore,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
Loading