...

Source file src/github.com/datawire/ambassador/v2/pkg/api/getambassador.io/v3alpha1/crd_ratelimitservice.go

Documentation: github.com/datawire/ambassador/v2/pkg/api/getambassador.io/v3alpha1

     1  // Copyright 2020 Datawire.  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  ///////////////////////////////////////////////////////////////////////////
    16  // Important: Run "make generate-fast" to regenerate code after modifying
    17  // this file.
    18  ///////////////////////////////////////////////////////////////////////////
    19  
    20  package v3alpha1
    21  
    22  import (
    23  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    24  )
    25  
    26  // RateLimitServiceSpec defines the desired state of RateLimitService
    27  type RateLimitServiceSpec struct {
    28  	// Common to all Ambassador objects.
    29  	AmbassadorID AmbassadorID `json:"ambassador_id,omitempty"`
    30  
    31  	// +kubebuilder:validation:Required
    32  	Service string               `json:"service,omitempty"`
    33  	Timeout *MillisecondDuration `json:"timeout_ms,omitempty"`
    34  	Domain  string               `json:"domain,omitempty"`
    35  	TLS     string               `json:"tls,omitempty"`
    36  	// +kubebuilder:validation:Enum={"v2","v3"}
    37  	ProtocolVersion string `json:"protocol_version,omitempty"`
    38  	StatsName       string `json:"stats_name,omitempty"`
    39  
    40  	V2ExplicitTLS *V2ExplicitTLS `json:"v2ExplicitTLS,omitempty"`
    41  }
    42  
    43  // RateLimitService is the Schema for the ratelimitservices API
    44  //
    45  // +kubebuilder:object:root=true
    46  type RateLimitService struct {
    47  	metav1.TypeMeta   `json:""`
    48  	metav1.ObjectMeta `json:"metadata,omitempty"`
    49  
    50  	Spec RateLimitServiceSpec `json:"spec,omitempty"`
    51  }
    52  
    53  // RateLimitServiceList contains a list of RateLimitServices.
    54  //
    55  // +kubebuilder:object:root=true
    56  type RateLimitServiceList struct {
    57  	metav1.TypeMeta `json:""`
    58  	metav1.ListMeta `json:"metadata,omitempty"`
    59  	Items           []RateLimitService `json:"items"`
    60  }
    61  
    62  func init() {
    63  	SchemeBuilder.Register(&RateLimitService{}, &RateLimitServiceList{})
    64  }
    65  

View as plain text