...

Source file src/sigs.k8s.io/gateway-api/apis/v1beta1/gatewayclass_types.go

Documentation: sigs.k8s.io/gateway-api/apis/v1beta1

     1  /*
     2  Copyright 2020 The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package v1beta1
    18  
    19  import (
    20  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    21  
    22  	v1 "sigs.k8s.io/gateway-api/apis/v1"
    23  )
    24  
    25  // +genclient
    26  // +genclient:nonNamespaced
    27  // +kubebuilder:object:root=true
    28  // +kubebuilder:resource:categories=gateway-api,scope=Cluster,shortName=gc
    29  // +kubebuilder:storageversion
    30  // +kubebuilder:subresource:status
    31  // +kubebuilder:printcolumn:name="Controller",type=string,JSONPath=`.spec.controllerName`
    32  // +kubebuilder:printcolumn:name="Accepted",type=string,JSONPath=`.status.conditions[?(@.type=="Accepted")].status`
    33  // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
    34  // +kubebuilder:printcolumn:name="Description",type=string,JSONPath=`.spec.description`,priority=1
    35  
    36  // GatewayClass describes a class of Gateways available to the user for creating
    37  // Gateway resources.
    38  //
    39  // It is recommended that this resource be used as a template for Gateways. This
    40  // means that a Gateway is based on the state of the GatewayClass at the time it
    41  // was created and changes to the GatewayClass or associated parameters are not
    42  // propagated down to existing Gateways. This recommendation is intended to
    43  // limit the blast radius of changes to GatewayClass or associated parameters.
    44  // If implementations choose to propagate GatewayClass changes to existing
    45  // Gateways, that MUST be clearly documented by the implementation.
    46  //
    47  // Whenever one or more Gateways are using a GatewayClass, implementations SHOULD
    48  // add the `gateway-exists-finalizer.gateway.networking.k8s.io` finalizer on the
    49  // associated GatewayClass. This ensures that a GatewayClass associated with a
    50  // Gateway is not deleted while in use.
    51  //
    52  // GatewayClass is a Cluster level resource.
    53  type GatewayClass v1.GatewayClass
    54  
    55  // +kubebuilder:object:root=true
    56  
    57  // GatewayClassList contains a list of GatewayClass
    58  type GatewayClassList struct {
    59  	metav1.TypeMeta `json:",inline"`
    60  	metav1.ListMeta `json:"metadata,omitempty"`
    61  	Items           []GatewayClass `json:"items"`
    62  }
    63  
    64  // GatewayClassSpec reflects the configuration of a class of Gateways.
    65  // +k8s:deepcopy-gen=false
    66  type GatewayClassSpec = v1.GatewayClassSpec
    67  
    68  // ParametersReference identifies an API object containing controller-specific
    69  // configuration resource within the cluster.
    70  // +k8s:deepcopy-gen=false
    71  type ParametersReference = v1.ParametersReference
    72  
    73  // GatewayClassConditionType is the type for status conditions on
    74  // Gateway resources. This type should be used with the
    75  // GatewayClassStatus.Conditions field.
    76  // +k8s:deepcopy-gen=false
    77  type GatewayClassConditionType = v1.GatewayClassConditionType
    78  
    79  // GatewayClassConditionReason defines the set of reasons that explain why a
    80  // particular GatewayClass condition type has been raised.
    81  // +k8s:deepcopy-gen=false
    82  type GatewayClassConditionReason = v1.GatewayClassConditionReason
    83  
    84  // GatewayClassStatus is the current status for the GatewayClass.
    85  // +k8s:deepcopy-gen=false
    86  type GatewayClassStatus = v1.GatewayClassStatus
    87  

View as plain text