Skip to content

Commit b6f5b0b

Browse files
committed
CSPL-4358 Rename LargeMessageStore to ObjectStorage
1 parent ba73a87 commit b6f5b0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+672
-677
lines changed

PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ resources:
137137
controller: true
138138
domain: splunk.com
139139
group: enterprise
140-
kind: LargeMessageStore
140+
kind: ObjectStorage
141141
path: github.com/splunk/splunk-operator/api/v4
142142
version: v4
143143
version: "3"

api/v4/indexercluster_types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const (
3434
IndexerClusterPausedAnnotation = "indexercluster.enterprise.splunk.com/paused"
3535
)
3636

37-
// +kubebuilder:validation:XValidation:rule="has(self.queueRef) == has(self.largeMessageStoreRef)",message="queueRef and largeMessageStoreRef must both be set or both be empty"
37+
// +kubebuilder:validation:XValidation:rule="has(self.queueRef) == has(self.objectStorageRef)",message="queueRef and objectStorageRef must both be set or both be empty"
3838
// IndexerClusterSpec defines the desired state of a Splunk Enterprise indexer cluster
3939
type IndexerClusterSpec struct {
4040
CommonSplunkSpec `json:",inline"`
@@ -44,8 +44,8 @@ type IndexerClusterSpec struct {
4444
QueueRef corev1.ObjectReference `json:"queueRef"`
4545

4646
// +optional
47-
// Large Message Store reference
48-
LargeMessageStoreRef corev1.ObjectReference `json:"largeMessageStoreRef"`
47+
// Object Storage reference
48+
ObjectStorageRef corev1.ObjectReference `json:"objectStorageRef"`
4949

5050
// Number of search head pods; a search head cluster will be created if > 1
5151
Replicas int32 `json:"replicas"`
@@ -124,8 +124,8 @@ type IndexerClusterStatus struct {
124124
// Queue
125125
Queue *QueueSpec `json:"queue,omitempty"`
126126

127-
// Large Message Store
128-
LargeMessageStore *LargeMessageStoreSpec `json:"largeMessageStore,omitempty"`
127+
// Object Storage
128+
ObjectStorage *ObjectStorageSpec `json:"objectStorage,omitempty"`
129129
}
130130

131131
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

api/v4/ingestorcluster_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ type IngestorClusterSpec struct {
4444
QueueRef corev1.ObjectReference `json:"queueRef"`
4545

4646
// +kubebuilder:validation:Required
47-
// Large Message Store reference
48-
LargeMessageStoreRef corev1.ObjectReference `json:"largeMessageStoreRef"`
47+
// Object Storage reference
48+
ObjectStorageRef corev1.ObjectReference `json:"objectStorageRef"`
4949
}
5050

5151
// IngestorClusterStatus defines the observed state of Ingestor Cluster
@@ -77,8 +77,8 @@ type IngestorClusterStatus struct {
7777
// Queue
7878
Queue *QueueSpec `json:"queue,omitempty"`
7979

80-
// Large Message Store
81-
LargeMessageStore *LargeMessageStoreSpec `json:"largeMessageStore,omitempty"`
80+
// Object Storage
81+
ObjectStorage *ObjectStorageSpec `json:"objectStorage,omitempty"`
8282
}
8383

8484
// +kubebuilder:object:root=true
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ import (
2323
)
2424

2525
const (
26-
// LargeMessageStorePausedAnnotation is the annotation that pauses the reconciliation (triggers
26+
// ObjectStoragePausedAnnotation is the annotation that pauses the reconciliation (triggers
2727
// an immediate requeue)
28-
LargeMessageStorePausedAnnotation = "largemessagestore.enterprise.splunk.com/paused"
28+
ObjectStoragePausedAnnotation = "objectstorage.enterprise.splunk.com/paused"
2929
)
3030

3131
// +kubebuilder:validation:XValidation:rule="self.provider != 's3' || has(self.s3)",message="s3 must be provided when provider is s3"
32-
// LargeMessageStoreSpec defines the desired state of LargeMessageStore
33-
type LargeMessageStoreSpec struct {
32+
// ObjectStorageSpec defines the desired state of ObjectStorage
33+
type ObjectStorageSpec struct {
3434
// +kubebuilder:validation:Required
3535
// +kubebuilder:validation:Enum=s3
3636
// Provider of queue resources
@@ -53,8 +53,8 @@ type S3Spec struct {
5353
Path string `json:"path"`
5454
}
5555

56-
// LargeMessageStoreStatus defines the observed state of LargeMessageStore.
57-
type LargeMessageStoreStatus struct {
56+
// ObjectStorageStatus defines the observed state of ObjectStorage.
57+
type ObjectStorageStatus struct {
5858
// Phase of the large message store
5959
Phase Phase `json:"phase"`
6060

@@ -68,27 +68,27 @@ type LargeMessageStoreStatus struct {
6868
// +kubebuilder:object:root=true
6969
// +kubebuilder:subresource:status
7070

71-
// LargeMessageStore is the Schema for a Splunk Enterprise large message store
71+
// ObjectStorage is the Schema for a Splunk Enterprise object storage
7272
// +k8s:openapi-gen=true
7373
// +kubebuilder:subresource:status
7474
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
75-
// +kubebuilder:resource:path=largemessagestores,scope=Namespaced,shortName=lms
76-
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Status of large message store"
77-
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of large message store resource"
75+
// +kubebuilder:resource:path=objectstorages,scope=Namespaced,shortName=os
76+
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Status of object storage"
77+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Age of object storage resource"
7878
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.message",description="Auxillary message describing CR status"
7979
// +kubebuilder:storageversion
8080

81-
// LargeMessageStore is the Schema for the largemessagestores API
82-
type LargeMessageStore struct {
81+
// ObjectStorage is the Schema for the objectstorages API
82+
type ObjectStorage struct {
8383
metav1.TypeMeta `json:",inline"`
8484
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
8585

86-
Spec LargeMessageStoreSpec `json:"spec"`
87-
Status LargeMessageStoreStatus `json:"status,omitempty,omitzero"`
86+
Spec ObjectStorageSpec `json:"spec"`
87+
Status ObjectStorageStatus `json:"status,omitempty,omitzero"`
8888
}
8989

9090
// DeepCopyObject implements runtime.Object
91-
func (in *LargeMessageStore) DeepCopyObject() runtime.Object {
91+
func (in *ObjectStorage) DeepCopyObject() runtime.Object {
9292
if c := in.DeepCopy(); c != nil {
9393
return c
9494
}
@@ -97,42 +97,42 @@ func (in *LargeMessageStore) DeepCopyObject() runtime.Object {
9797

9898
// +kubebuilder:object:root=true
9999

100-
// LargeMessageStoreList contains a list of LargeMessageStore
101-
type LargeMessageStoreList struct {
100+
// ObjectStorageList contains a list of ObjectStorage
101+
type ObjectStorageList struct {
102102
metav1.TypeMeta `json:",inline"`
103103
metav1.ListMeta `json:"metadata,omitempty"`
104-
Items []LargeMessageStore `json:"items"`
104+
Items []ObjectStorage `json:"items"`
105105
}
106106

107107
func init() {
108-
SchemeBuilder.Register(&LargeMessageStore{}, &LargeMessageStoreList{})
108+
SchemeBuilder.Register(&ObjectStorage{}, &ObjectStorageList{})
109109
}
110110

111111
// NewEvent creates a new event associated with the object and ready
112112
// to be published to Kubernetes API
113-
func (bc *LargeMessageStore) NewEvent(eventType, reason, message string) corev1.Event {
113+
func (os *ObjectStorage) NewEvent(eventType, reason, message string) corev1.Event {
114114
t := metav1.Now()
115115
return corev1.Event{
116116
ObjectMeta: metav1.ObjectMeta{
117117
GenerateName: reason + "-",
118-
Namespace: bc.ObjectMeta.Namespace,
118+
Namespace: os.ObjectMeta.Namespace,
119119
},
120120
InvolvedObject: corev1.ObjectReference{
121-
Kind: "LargeMessageStore",
122-
Namespace: bc.Namespace,
123-
Name: bc.Name,
124-
UID: bc.UID,
121+
Kind: "ObjectStorage",
122+
Namespace: os.Namespace,
123+
Name: os.Name,
124+
UID: os.UID,
125125
APIVersion: GroupVersion.String(),
126126
},
127127
Reason: reason,
128128
Message: message,
129129
Source: corev1.EventSource{
130-
Component: "splunk-large-message-store-controller",
130+
Component: "splunk-object-storage-controller",
131131
},
132132
FirstTimestamp: t,
133133
LastTimestamp: t,
134134
Count: 1,
135135
Type: eventType,
136-
ReportingController: "enterprise.splunk.com/large-message-store-controller",
136+
ReportingController: "enterprise.splunk.com/object-storage-controller",
137137
}
138138
}

api/v4/queue_types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,18 @@ func init() {
120120

121121
// NewEvent creates a new event associated with the object and ready
122122
// to be published to Kubernetes API
123-
func (bc *Queue) NewEvent(eventType, reason, message string) corev1.Event {
123+
func (os *Queue) NewEvent(eventType, reason, message string) corev1.Event {
124124
t := metav1.Now()
125125
return corev1.Event{
126126
ObjectMeta: metav1.ObjectMeta{
127127
GenerateName: reason + "-",
128-
Namespace: bc.ObjectMeta.Namespace,
128+
Namespace: os.ObjectMeta.Namespace,
129129
},
130130
InvolvedObject: corev1.ObjectReference{
131131
Kind: "Queue",
132-
Namespace: bc.Namespace,
133-
Name: bc.Name,
134-
UID: bc.UID,
132+
Namespace: os.Namespace,
133+
Name: os.Name,
134+
UID: os.UID,
135135
APIVersion: GroupVersion.String(),
136136
},
137137
Reason: reason,

0 commit comments

Comments
 (0)