@@ -23,14 +23,14 @@ import (
2323)
2424
2525const (
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
107107func 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}
0 commit comments