SzyWilliam commented on code in PR #70:
URL: https://github.com/apache/skywalking-swck/pull/70#discussion_r964423590


##########
operator/apis/operator/v1alpha1/banyandb_types.go:
##########
@@ -0,0 +1,66 @@
+package v1alpha1
+
+import (
+       appsv1 "k8s.io/api/apps/v1"
+       corev1 "k8s.io/api/core/v1"
+       metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+type BanyanDBSpec struct {
+
+       // Version of BanyanDB.
+       // +kubebuilder:validation:Required
+       Version string `json:"version"`
+
+       // Image is the BanyanDB Docker image to deploy.
+       // +kubebuilder:validation:Required
+       Image string `json:"image,omitempty"`
+
+       // BanyanDB startup parameters
+       // +kubebuilder:validation:Optional
+       Config map[string]string `json:"config"`
+
+       // BanyanDB Service
+       // +kubebuilder:validation:Optional
+       Service Service `json:"service,omitempty"`
+
+       // BanyanDB Storage
+       // +kubebuilder:validation:Optional
+       Storage corev1.PersistentVolumeClaim `json:"storage,omitempty"`
+}
+
+type BanyanDBState int8
+
+const (
+       Ready BanyanDBState = iota
+       Reconciling
+       Fail
+)
+
+type BanyanDBStatus struct {
+       // BanyanDB current state
+       State BanyanDBState `json:"state,omitempty"`
+       // Represents the latest available observations of the underlying 
statefulset's current state.
+       // +kubebuilder:validation:Optional
+       Conditions []appsv1.StatefulSetCondition `json:"conditions,omitempty"`
+}
+
+// +kubebuilder:object:root=true
+
+// BanyanDB is the Schema for the BanyanDB API
+type BanyanDB struct {
+       metav1.TypeMeta   `json:",inline"`
+       metav1.ObjectMeta `json:"metadata,omitempty"`
+
+       Spec   BanyanDBSpec   `json:"spec,omitempty"`

Review Comment:
   The kubebuilder automatically generates `omitempty`, as well as in other 
resource types. Should I delete it manually?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to