...

Source file src/github.com/emissary-ingress/emissary/v3/pkg/api/getambassador.io/v2/crd_ratelimitservice.go

Documentation: github.com/emissary-ingress/emissary/v3/pkg/api/getambassador.io/v2

     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 update-yaml" to regenerate code after modifying
    17  // this file.
    18  ///////////////////////////////////////////////////////////////////////////
    19  
    20  package v2
    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  	// +k8s:conversion-gen=false
    36  	TLS *BoolOrString `json:"tls,omitempty"`
    37  	// +kubebuilder:validation:Enum={"v2","v3"}
    38  	ProtocolVersion string `json:"protocol_version,omitempty"`
    39  
    40  	// +k8s:conversion-gen:rename=StatsName
    41  	V3StatsName string `json:"v3StatsName,omitempty"`
    42  
    43  	// +k8s:conversion-gen:rename=FailureModeDeny
    44  	//
    45  	// FailureModeDeny when set to true, envoy will deny traffic if it
    46  	// is unable to communicate with the rate limit service.
    47  	V3FailureModeDeny bool `json:"failure_mode_deny,omitempty"`
    48  }
    49  
    50  // RateLimitService is the Schema for the ratelimitservices API
    51  //
    52  // +kubebuilder:object:root=true
    53  // +kubebuilder:storageversion
    54  type RateLimitService struct {
    55  	metav1.TypeMeta   `json:""`
    56  	metav1.ObjectMeta `json:"metadata,omitempty"`
    57  
    58  	Spec RateLimitServiceSpec `json:"spec,omitempty"`
    59  }
    60  
    61  // RateLimitServiceList contains a list of RateLimitServices.
    62  //
    63  // +kubebuilder:object:root=true
    64  type RateLimitServiceList struct {
    65  	metav1.TypeMeta `json:""`
    66  	metav1.ListMeta `json:"metadata,omitempty"`
    67  	Items           []RateLimitService `json:"items"`
    68  }
    69  
    70  func init() {
    71  	SchemeBuilder.Register(&RateLimitService{}, &RateLimitServiceList{})
    72  }
    73  

View as plain text