github.com/tototoman/operator-sdk@v0.8.2/test/test-framework/pkg/apis/cache/v1alpha1/memcachedrs_types.go (about)

     1  // Copyright 2019 The Operator-SDK Authors
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package v1alpha1
    16  
    17  import (
    18  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    19  )
    20  
    21  // EDIT THIS FILE!  THIS IS SCAFFOLDING FOR YOU TO OWN!
    22  // NOTE: json tags are required.  Any new fields you add must have json tags for the fields to be serialized.
    23  
    24  // MemcachedRSSpec defines the desired state of MemcachedRS
    25  // +k8s:openapi-gen=true
    26  type MemcachedRSSpec struct {
    27  	NumNodes int32 `json:"numNodes"`
    28  }
    29  
    30  // MemcachedRSStatus defines the observed state of MemcachedRS
    31  // +k8s:openapi-gen=true
    32  type MemcachedRSStatus struct {
    33  	NodeList []string `json:"nodeList"`
    34  	Test     bool     `json:"test"`
    35  }
    36  
    37  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
    38  
    39  // MemcachedRS is the Schema for the memcachedrs API
    40  // +k8s:openapi-gen=true
    41  // +kubebuilder:subresource:status
    42  type MemcachedRS struct {
    43  	metav1.TypeMeta   `json:",inline"`
    44  	metav1.ObjectMeta `json:"metadata,omitempty"`
    45  
    46  	Spec   MemcachedRSSpec   `json:"spec,omitempty"`
    47  	Status MemcachedRSStatus `json:"status,omitempty"`
    48  }
    49  
    50  // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
    51  
    52  // MemcachedRSList contains a list of MemcachedRS
    53  type MemcachedRSList struct {
    54  	metav1.TypeMeta `json:",inline"`
    55  	metav1.ListMeta `json:"metadata,omitempty"`
    56  	Items           []MemcachedRS `json:"items"`
    57  }
    58  
    59  func init() {
    60  	SchemeBuilder.Register(&MemcachedRS{}, &MemcachedRSList{})
    61  }