kubesphere.io/api@v0.0.0-20231107125330-c9a03957060c/network/calicov3/block_affinity_types.go (about)

     1  // Copyright (c) 2019-2020 Tigera, Inc. All rights reserved.
     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 calicov3
    16  
    17  import (
    18  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    19  
    20  	v3 "github.com/projectcalico/calico/libcalico-go/lib/apis/v3"
    21  )
    22  
    23  // +genclient
    24  // +kubebuilder:object:root=true
    25  // +genclient:nonNamespaced
    26  // +k8s:openapi-gen=true
    27  // +kubebuilder:resource:scope=Cluster
    28  type BlockAffinity struct {
    29  	metav1.TypeMeta   `json:",inline"`
    30  	metav1.ObjectMeta `json:"metadata,omitempty"`
    31  	Spec              v3.BlockAffinitySpec `json:"spec,omitempty"`
    32  }
    33  
    34  // +kubebuilder:object:root=true
    35  
    36  // BlockAffinityList contains a list of BlockAffinity resources.
    37  type BlockAffinityList struct {
    38  	metav1.TypeMeta `json:",inline"`
    39  	metav1.ListMeta `json:"metadata"`
    40  	Items           []BlockAffinity `json:"items"`
    41  }