2020-07-26 22:10:35 +00:00
|
|
|
/*
|
2020-08-02 06:27:46 +00:00
|
|
|
|
2020-07-26 22:10:35 +00:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2020-08-02 06:27:46 +00:00
|
|
|
package v1
|
2020-07-26 22:10:35 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
|
|
)
|
|
|
|
|
|
|
|
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
|
|
|
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
|
|
|
|
2020-08-02 06:27:46 +00:00
|
|
|
// SeaweedSpec defines the desired state of Seaweed
|
|
|
|
type SeaweedSpec struct {
|
2020-07-26 22:10:35 +00:00
|
|
|
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
|
|
|
// Important: Run "make" to regenerate code after modifying this file
|
|
|
|
|
2020-07-26 22:26:27 +00:00
|
|
|
// MetricsAddress is Prometheus gateway address
|
|
|
|
MetricsAddress string `json:"metricsAddress,omitempty"`
|
2020-08-05 05:13:36 +00:00
|
|
|
|
2020-10-17 09:25:23 +00:00
|
|
|
// Image
|
|
|
|
Image string `json:"image,omitempty"`
|
|
|
|
|
2020-08-05 05:13:36 +00:00
|
|
|
// VolumeServerCount is the number of volume servers, default to 1
|
2020-10-17 06:25:46 +00:00
|
|
|
VolumeServerCount int32 `json:"volumeServerCount,omitempty"`
|
2020-08-06 04:11:40 +00:00
|
|
|
|
|
|
|
// FilerCount is the number of filers, default to 1
|
2020-10-17 06:25:46 +00:00
|
|
|
FilerCount int32 `json:"filerCount,omitempty"`
|
2020-07-26 22:10:35 +00:00
|
|
|
}
|
|
|
|
|
2020-08-02 06:27:46 +00:00
|
|
|
// SeaweedStatus defines the observed state of Seaweed
|
|
|
|
type SeaweedStatus struct {
|
2020-07-26 22:10:35 +00:00
|
|
|
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
|
|
|
// Important: Run "make" to regenerate code after modifying this file
|
|
|
|
}
|
|
|
|
|
|
|
|
// +kubebuilder:object:root=true
|
|
|
|
// +kubebuilder:subresource:status
|
|
|
|
|
2020-08-02 06:27:46 +00:00
|
|
|
// Seaweed is the Schema for the seaweeds API
|
|
|
|
type Seaweed struct {
|
2020-07-26 22:10:35 +00:00
|
|
|
metav1.TypeMeta `json:",inline"`
|
|
|
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
|
|
|
|
2020-08-02 06:27:46 +00:00
|
|
|
Spec SeaweedSpec `json:"spec,omitempty"`
|
|
|
|
Status SeaweedStatus `json:"status,omitempty"`
|
2020-07-26 22:10:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// +kubebuilder:object:root=true
|
|
|
|
|
2020-08-02 06:27:46 +00:00
|
|
|
// SeaweedList contains a list of Seaweed
|
|
|
|
type SeaweedList struct {
|
2020-07-26 22:10:35 +00:00
|
|
|
metav1.TypeMeta `json:",inline"`
|
|
|
|
metav1.ListMeta `json:"metadata,omitempty"`
|
2020-08-02 06:27:46 +00:00
|
|
|
Items []Seaweed `json:"items"`
|
2020-07-26 22:10:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2020-08-02 06:27:46 +00:00
|
|
|
SchemeBuilder.Register(&Seaweed{}, &SeaweedList{})
|
2020-07-26 22:10:35 +00:00
|
|
|
}
|