fix golang tutorial spec to match controller code
@@ -111,12 +111,20 @@ Define the API for the Memcached Custom Resource(CR) by modifying the Go type de
type MemcachedSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
- // Size defines the number of Memcached instances
+
// The following markers will use OpenAPI v3 schema to validate the value
+ // More info: https://book.kubebuilder.io/reference/markers/crd-validation.html
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=3
// +kubebuilder:validation:ExclusiveMaximum=false
+
+ // Size defines the number of Memcached instances
+ // +operator-sdk:csv:customresourcedefinitions:type=spec
Size int32 `json:"size,omitempty"`
+
+ // Port defines the port that will be used to init the container with the image
+ // +operator-sdk:csv:customresourcedefinitions:type=spec
+ ContainerPort int32 `json:"containerPort,omitempty"`
}
// MemcachedStatus defines the observed state of Memcached
@@ -128,6 +136,10 @@ type MemcachedStatus struct {
// condition types may define expected values and meanings for this field, and whether the values
// are considered a guaranteed API.
// Memcached.status.conditions.Message is a human readable message indicating details about the transition.
+ // For further information see: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
+
+ // Conditions store the status conditions of the Memcached instances
+ // +operator-sdk:csv:customresourcedefinitions:type=status
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}
```
